Skip to content

Commit c5857bd

Browse files
legendecastargos
authored andcommitted
test: avoid copying test source files
Converting the helper functions to be inlined and making the helper file header only. PR-URL: #49515 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]>
1 parent e26b89e commit c5857bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+156
-148
lines changed

‎Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,7 @@ FORMAT_CPP_FILES += $(LINT_CPP_FILES)
14471447
# C source codes.
14481448
FORMAT_CPP_FILES += $(wildcard \
14491449
benchmark/napi/*/*.c \
1450+
test/js-native-api/*.h \
14501451
test/js-native-api/*/*.c \
14511452
test/js-native-api/*/*.h \
14521453
test/node-api/*/*.c \

‎test/js-native-api/2_function_arguments/2_function_arguments.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include<js_native_api.h>
22
#include"../common.h"
3+
#include"../entry_point.h"
34

45
staticnapi_valueAdd(napi_envenv, napi_callback_infoinfo){
56
size_targc=2;

‎test/js-native-api/2_function_arguments/binding.gyp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"target_name": "2_function_arguments",
55
"sources": [
6-
"../entry_point.c",
76
"2_function_arguments.c"
87
]
98
}

‎test/js-native-api/3_callbacks/3_callbacks.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include<js_native_api.h>
2-
#include"../common.h"
32
#include<string.h>
3+
#include"../common.h"
4+
#include"../entry_point.h"
45

56
staticnapi_valueRunCallback(napi_envenv, napi_callback_infoinfo){
67
size_targc=2;

‎test/js-native-api/3_callbacks/binding.gyp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"target_name": "3_callbacks",
55
"sources": [
6-
"../entry_point.c",
76
"3_callbacks.c"
87
]
98
}

‎test/js-native-api/4_object_factory/4_object_factory.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include<js_native_api.h>
22
#include"../common.h"
3+
#include"../entry_point.h"
34

45
staticnapi_valueCreateObject(napi_envenv, napi_callback_infoinfo){
56
size_targc=1;

‎test/js-native-api/4_object_factory/binding.gyp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"target_name": "4_object_factory",
55
"sources": [
6-
"../entry_point.c",
76
"4_object_factory.c"
87
]
98
}

‎test/js-native-api/5_function_factory/5_function_factory.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include<js_native_api.h>
22
#include"../common.h"
3+
#include"../entry_point.h"
34

45
staticnapi_valueMyFunction(napi_envenv, napi_callback_infoinfo){
56
napi_valuestr;

‎test/js-native-api/5_function_factory/binding.gyp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"target_name": "5_function_factory",
55
"sources": [
6-
"../entry_point.c",
76
"5_function_factory.c"
87
]
98
}

‎test/js-native-api/6_object_wrap/6_object_wrap.cc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include"../common.h"
2+
#include"../entry_point.h"
23
#include"assert.h"
34
#include"myobject.h"
45

0 commit comments

Comments
(0)