diff options
author | Gabriel Schulhof <gabrielschulhof@gmail.com> | 2021-05-14 09:17:02 -0700 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2021-05-31 15:34:47 -0400 |
commit | 6da4aa30c6f31dbcb83579bf82192d8418e0dc9b (patch) | |
tree | 02d4a141441184da8bf837fe8d9579e44dbd92e7 /test/js-native-api | |
parent | a47fd67154a609421fbfa228493d67be8c2a9ae9 (diff) | |
download | node-new-6da4aa30c6f31dbcb83579bf82192d8418e0dc9b.tar.gz |
test: give js-native-api tests consistent names
The convention for js-native-api/<test_name>:
* <test_name>.c or <test_name>.cc has the entry point
* The name of the target is <test_name>
PR-URL: https://github.com/nodejs/node/pull/38692
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/js-native-api')
24 files changed, 24 insertions, 24 deletions
diff --git a/test/js-native-api/2_function_arguments/binding.c b/test/js-native-api/2_function_arguments/2_function_arguments.c index 2f7a196f65..2f7a196f65 100644 --- a/test/js-native-api/2_function_arguments/binding.c +++ b/test/js-native-api/2_function_arguments/2_function_arguments.c diff --git a/test/js-native-api/2_function_arguments/binding.gyp b/test/js-native-api/2_function_arguments/binding.gyp index 2a144bab42..7e35a4c9d6 100644 --- a/test/js-native-api/2_function_arguments/binding.gyp +++ b/test/js-native-api/2_function_arguments/binding.gyp @@ -1,10 +1,10 @@ { "targets": [ { - "target_name": "binding", + "target_name": "2_function_arguments", "sources": [ "../entry_point.c", - "binding.c" + "2_function_arguments.c" ] } ] diff --git a/test/js-native-api/2_function_arguments/test.js b/test/js-native-api/2_function_arguments/test.js index e70f76b718..bf0ecabac3 100644 --- a/test/js-native-api/2_function_arguments/test.js +++ b/test/js-native-api/2_function_arguments/test.js @@ -1,6 +1,6 @@ 'use strict'; const common = require('../../common'); const assert = require('assert'); -const addon = require(`./build/${common.buildType}/binding`); +const addon = require(`./build/${common.buildType}/2_function_arguments`); assert.strictEqual(addon.add(3, 5), 8); diff --git a/test/js-native-api/3_callbacks/binding.c b/test/js-native-api/3_callbacks/3_callbacks.c index 3be18daff1..3be18daff1 100644 --- a/test/js-native-api/3_callbacks/binding.c +++ b/test/js-native-api/3_callbacks/3_callbacks.c diff --git a/test/js-native-api/3_callbacks/binding.gyp b/test/js-native-api/3_callbacks/binding.gyp index 2a144bab42..3cc662c407 100644 --- a/test/js-native-api/3_callbacks/binding.gyp +++ b/test/js-native-api/3_callbacks/binding.gyp @@ -1,10 +1,10 @@ { "targets": [ { - "target_name": "binding", + "target_name": "3_callbacks", "sources": [ "../entry_point.c", - "binding.c" + "3_callbacks.c" ] } ] diff --git a/test/js-native-api/3_callbacks/test.js b/test/js-native-api/3_callbacks/test.js index 25e070d974..b84d3fbc9d 100644 --- a/test/js-native-api/3_callbacks/test.js +++ b/test/js-native-api/3_callbacks/test.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); const assert = require('assert'); -const addon = require(`./build/${common.buildType}/binding`); +const addon = require(`./build/${common.buildType}/3_callbacks`); addon.RunCallback(function(msg) { assert.strictEqual(msg, 'hello world'); diff --git a/test/js-native-api/4_object_factory/binding.c b/test/js-native-api/4_object_factory/4_object_factory.c index 5b06517744..5b06517744 100644 --- a/test/js-native-api/4_object_factory/binding.c +++ b/test/js-native-api/4_object_factory/4_object_factory.c diff --git a/test/js-native-api/4_object_factory/binding.gyp b/test/js-native-api/4_object_factory/binding.gyp index 2a144bab42..6cb3a9fa68 100644 --- a/test/js-native-api/4_object_factory/binding.gyp +++ b/test/js-native-api/4_object_factory/binding.gyp @@ -1,10 +1,10 @@ { "targets": [ { - "target_name": "binding", + "target_name": "4_object_factory", "sources": [ "../entry_point.c", - "binding.c" + "4_object_factory.c" ] } ] diff --git a/test/js-native-api/4_object_factory/test.js b/test/js-native-api/4_object_factory/test.js index 15313c1547..16cad91753 100644 --- a/test/js-native-api/4_object_factory/test.js +++ b/test/js-native-api/4_object_factory/test.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); const assert = require('assert'); -const addon = require(`./build/${common.buildType}/binding`); +const addon = require(`./build/${common.buildType}/4_object_factory`); const obj1 = addon('hello'); const obj2 = addon('world'); diff --git a/test/js-native-api/5_function_factory/binding.c b/test/js-native-api/5_function_factory/5_function_factory.c index 679f09fee9..679f09fee9 100644 --- a/test/js-native-api/5_function_factory/binding.c +++ b/test/js-native-api/5_function_factory/5_function_factory.c diff --git a/test/js-native-api/5_function_factory/binding.gyp b/test/js-native-api/5_function_factory/binding.gyp index 2a144bab42..c621c29f18 100644 --- a/test/js-native-api/5_function_factory/binding.gyp +++ b/test/js-native-api/5_function_factory/binding.gyp @@ -1,10 +1,10 @@ { "targets": [ { - "target_name": "binding", + "target_name": "5_function_factory", "sources": [ "../entry_point.c", - "binding.c" + "5_function_factory.c" ] } ] diff --git a/test/js-native-api/5_function_factory/test.js b/test/js-native-api/5_function_factory/test.js index 7521824e1e..9d4772985c 100644 --- a/test/js-native-api/5_function_factory/test.js +++ b/test/js-native-api/5_function_factory/test.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); const assert = require('assert'); -const addon = require(`./build/${common.buildType}/binding`); +const addon = require(`./build/${common.buildType}/5_function_factory`); const fn = addon(); assert.strictEqual(fn(), 'hello world'); // 'hello world' diff --git a/test/js-native-api/6_object_wrap/myobject.cc b/test/js-native-api/6_object_wrap/6_object_wrap.cc index 7f8fdd3416..7f8fdd3416 100644 --- a/test/js-native-api/6_object_wrap/myobject.cc +++ b/test/js-native-api/6_object_wrap/6_object_wrap.cc diff --git a/test/js-native-api/6_object_wrap/binding.gyp b/test/js-native-api/6_object_wrap/binding.gyp index 0456804aaf..2807d6a157 100644 --- a/test/js-native-api/6_object_wrap/binding.gyp +++ b/test/js-native-api/6_object_wrap/binding.gyp @@ -1,10 +1,10 @@ { "targets": [ { - "target_name": "binding", + "target_name": "6_object_wrap", "sources": [ "../entry_point.c", - "myobject.cc" + "6_object_wrap.cc" ] } ] diff --git a/test/js-native-api/6_object_wrap/test.js b/test/js-native-api/6_object_wrap/test.js index f3535969c6..c113a47299 100644 --- a/test/js-native-api/6_object_wrap/test.js +++ b/test/js-native-api/6_object_wrap/test.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); const assert = require('assert'); -const addon = require(`./build/${common.buildType}/binding`); +const addon = require(`./build/${common.buildType}/6_object_wrap`); const getterOnlyErrorRE = /^TypeError: Cannot set property .* of #<.*> which has only a getter$/; diff --git a/test/js-native-api/7_factory_wrap/binding.cc b/test/js-native-api/7_factory_wrap/7_factory_wrap.cc index b1dbd8eee4..b1dbd8eee4 100644 --- a/test/js-native-api/7_factory_wrap/binding.cc +++ b/test/js-native-api/7_factory_wrap/7_factory_wrap.cc diff --git a/test/js-native-api/7_factory_wrap/binding.gyp b/test/js-native-api/7_factory_wrap/binding.gyp index 4071c9fe8c..f9096674a7 100644 --- a/test/js-native-api/7_factory_wrap/binding.gyp +++ b/test/js-native-api/7_factory_wrap/binding.gyp @@ -1,10 +1,10 @@ { "targets": [ { - "target_name": "binding", + "target_name": "7_factory_wrap", "sources": [ "../entry_point.c", - "binding.cc", + "7_factory_wrap.cc", "myobject.cc" ] } diff --git a/test/js-native-api/7_factory_wrap/test.js b/test/js-native-api/7_factory_wrap/test.js index ff1516eaa5..fd9771d43b 100644 --- a/test/js-native-api/7_factory_wrap/test.js +++ b/test/js-native-api/7_factory_wrap/test.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); -const test = require(`./build/${common.buildType}/binding`); +const test = require(`./build/${common.buildType}/7_factory_wrap`); assert.strictEqual(test.finalizeCount, 0); async function runGCTests() { diff --git a/test/js-native-api/8_passing_wrapped/binding.cc b/test/js-native-api/8_passing_wrapped/8_passing_wrapped.cc index 5b3b790958..5b3b790958 100644 --- a/test/js-native-api/8_passing_wrapped/binding.cc +++ b/test/js-native-api/8_passing_wrapped/8_passing_wrapped.cc diff --git a/test/js-native-api/8_passing_wrapped/binding.gyp b/test/js-native-api/8_passing_wrapped/binding.gyp index 4071c9fe8c..f85cc4cc97 100644 --- a/test/js-native-api/8_passing_wrapped/binding.gyp +++ b/test/js-native-api/8_passing_wrapped/binding.gyp @@ -1,10 +1,10 @@ { "targets": [ { - "target_name": "binding", + "target_name": "8_passing_wrapped", "sources": [ "../entry_point.c", - "binding.cc", + "8_passing_wrapped.cc", "myobject.cc" ] } diff --git a/test/js-native-api/8_passing_wrapped/test.js b/test/js-native-api/8_passing_wrapped/test.js index 54c829d9c7..d6da19fecd 100644 --- a/test/js-native-api/8_passing_wrapped/test.js +++ b/test/js-native-api/8_passing_wrapped/test.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); -const addon = require(`./build/${common.buildType}/binding`); +const addon = require(`./build/${common.buildType}/8_passing_wrapped`); async function runTest() { let obj1 = addon.createObject(10); diff --git a/test/js-native-api/test_new_target/binding.gyp b/test/js-native-api/test_new_target/binding.gyp index dc050e6839..f9cc6e8375 100644 --- a/test/js-native-api/test_new_target/binding.gyp +++ b/test/js-native-api/test_new_target/binding.gyp @@ -1,11 +1,11 @@ { 'targets': [ { - 'target_name': 'binding', + 'target_name': 'test_new_target', 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], 'sources': [ '../entry_point.c', - 'binding.c' + 'test_new_target.c' ] } ] diff --git a/test/js-native-api/test_new_target/test.js b/test/js-native-api/test_new_target/test.js index 702e8ca8b4..02d610e1e0 100644 --- a/test/js-native-api/test_new_target/test.js +++ b/test/js-native-api/test_new_target/test.js @@ -2,7 +2,7 @@ const common = require('../../common'); const assert = require('assert'); -const binding = require(`./build/${common.buildType}/binding`); +const binding = require(`./build/${common.buildType}/test_new_target`); class Class extends binding.BaseClass { constructor() { diff --git a/test/js-native-api/test_new_target/binding.c b/test/js-native-api/test_new_target/test_new_target.c index d3fe5b0d2d..d3fe5b0d2d 100644 --- a/test/js-native-api/test_new_target/binding.c +++ b/test/js-native-api/test_new_target/test_new_target.c |