Skip to content

Commit d02fb36

Browse files
jasnelltargos
authored andcommitted
test: move common.isCPPSymbolsNotMapped to tick-processor tests
`common.isCPPSymbolsNotMapped` is used only by the tests in the `test/tick-processor` folder. Move it local to those to get it out of `common`. PR-URL: #22459 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 9ec105c commit d02fb36

8 files changed

+28
-19
lines changed

test/common/README.md

-5
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,6 @@ Platform check for Windows.
224224

225225
Platform check for Windows 32-bit on Windows 64-bit.
226226

227-
### isCPPSymbolsNotMapped
228-
* [&lt;boolean>]
229-
230-
Platform check for C++ symbols are mapped or not.
231-
232227
### leakedGlobals()
233228
* return [&lt;Array>]
234229

test/common/index.js

-6
Original file line numberDiff line numberDiff line change
@@ -799,9 +799,3 @@ exports.runWithInvalidFD = function(func) {
799799

800800
exports.printSkipMessage('Could not generate an invalid fd');
801801
};
802-
803-
exports.isCPPSymbolsNotMapped = exports.isWindows ||
804-
exports.isSunOS ||
805-
exports.isAIX ||
806-
exports.isLinuxPPCBE ||
807-
exports.isFreeBSD;

test/common/index.mjs

+2-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ const {
5151
getBufferSources,
5252
disableCrashOnUnhandledRejection,
5353
getTTYfd,
54-
runWithInvalidFD,
55-
isCPPSymbolsNotMapped
54+
runWithInvalidFD
5655
} = common;
5756

5857
export {
@@ -104,6 +103,5 @@ export {
104103
getBufferSources,
105104
disableCrashOnUnhandledRejection,
106105
getTTYfd,
107-
runWithInvalidFD,
108-
isCPPSymbolsNotMapped
106+
runWithInvalidFD
109107
};

test/tick-processor/test-tick-processor-builtin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
'use strict';
22
const common = require('../common');
3+
const { isCPPSymbolsNotMapped } = require('./util');
34

45
if (!common.enoughTestCpu)
56
common.skip('test is CPU-intensive');
67

7-
if (common.isCPPSymbolsNotMapped) {
8+
if (isCPPSymbolsNotMapped) {
89
common.skip('C++ symbols are not mapped for this os.');
910
}
1011

test/tick-processor/test-tick-processor-cpp-core.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
'use strict';
22
const common = require('../common');
3+
const { isCPPSymbolsNotMapped } = require('./util');
34

45
if (!common.enoughTestCpu)
56
common.skip('test is CPU-intensive');
67

7-
if (common.isCPPSymbolsNotMapped) {
8+
if (isCPPSymbolsNotMapped) {
89
common.skip('C++ symbols are not mapped for this os.');
910
}
1011

test/tick-processor/test-tick-processor-polyfill-brokenfile.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
'use strict';
22
const common = require('../common');
3+
const { isCPPSymbolsNotMapped } = require('./util');
34
const tmpdir = require('../common/tmpdir');
45
tmpdir.refresh();
56

67
if (!common.enoughTestCpu)
78
common.skip('test is CPU-intensive');
89

9-
if (common.isCPPSymbolsNotMapped) {
10+
if (isCPPSymbolsNotMapped) {
1011
common.skip('C++ symbols are not mapped for this OS.');
1112
}
1213

test/tick-processor/test-tick-processor-preprocess-flag.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
'use strict';
22
const common = require('../common');
3+
const { isCPPSymbolsNotMapped } = require('./util');
34

45
if (!common.enoughTestCpu)
56
common.skip('test is CPU-intensive');
67

7-
if (common.isCPPSymbolsNotMapped) {
8+
if (isCPPSymbolsNotMapped) {
89
common.skip('C++ symbols are not mapped for this os.');
910
}
1011

test/tick-processor/util.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict';
2+
3+
// Utilities for the tick-processor tests
4+
const {
5+
isWindows,
6+
isSunOS,
7+
isAIX,
8+
isLinuxPPCBE,
9+
isFreeBSD
10+
} = require('../common');
11+
12+
module.exports = {
13+
isCPPSymbolsNotMapped: isWindows ||
14+
isSunOS ||
15+
isAIX ||
16+
isLinuxPPCBE ||
17+
isFreeBSD
18+
};

0 commit comments

Comments
 (0)