Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: give js-native-api tests consistent names #38692

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/js-native-api/2_function_arguments/binding.gyp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"targets": [
{
"target_name": "binding",
"target_name": "2_function_arguments",
"sources": [
"../entry_point.c",
"binding.c"
"2_function_arguments.c"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/js-native-api/2_function_arguments/test.js
Original file line number Diff line number Diff line change
@@ -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);
4 changes: 2 additions & 2 deletions test/js-native-api/3_callbacks/binding.gyp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"targets": [
{
"target_name": "binding",
"target_name": "3_callbacks",
"sources": [
"../entry_point.c",
"binding.c"
"3_callbacks.c"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/js-native-api/3_callbacks/test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
4 changes: 2 additions & 2 deletions test/js-native-api/4_object_factory/binding.gyp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"targets": [
{
"target_name": "binding",
"target_name": "4_object_factory",
"sources": [
"../entry_point.c",
"binding.c"
"4_object_factory.c"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/js-native-api/4_object_factory/test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
4 changes: 2 additions & 2 deletions test/js-native-api/5_function_factory/binding.gyp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"targets": [
{
"target_name": "binding",
"target_name": "5_function_factory",
"sources": [
"../entry_point.c",
"binding.c"
"5_function_factory.c"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/js-native-api/5_function_factory/test.js
Original file line number Diff line number Diff line change
@@ -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'
4 changes: 2 additions & 2 deletions test/js-native-api/6_object_wrap/binding.gyp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"targets": [
{
"target_name": "binding",
"target_name": "6_object_wrap",
"sources": [
"../entry_point.c",
"myobject.cc"
"6_object_wrap.cc"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/js-native-api/6_object_wrap/test.js
Original file line number Diff line number Diff line change
@@ -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$/;
Expand Down
4 changes: 2 additions & 2 deletions test/js-native-api/7_factory_wrap/binding.gyp
Original file line number Diff line number Diff line change
@@ -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"
]
}
Expand Down
2 changes: 1 addition & 1 deletion test/js-native-api/7_factory_wrap/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions test/js-native-api/8_passing_wrapped/binding.gyp
Original file line number Diff line number Diff line change
@@ -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"
]
}
Expand Down
2 changes: 1 addition & 1 deletion test/js-native-api/8_passing_wrapped/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions test/js-native-api/test_new_target/binding.gyp
Original file line number Diff line number Diff line change
@@ -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'
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/js-native-api/test_new_target/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down