2016-09-15 07:26:52 +08:00
|
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
2018-08-22 23:14:31 +08:00
|
|
|
const { isCPPSymbolsNotMapped } = require('./util');
|
2016-09-15 07:26:52 +08:00
|
|
|
|
2017-07-01 07:29:09 +08:00
|
|
|
if (!common.enoughTestCpu)
|
|
|
|
common.skip('test is CPU-intensive');
|
|
|
|
|
2018-08-22 23:14:31 +08:00
|
|
|
if (isCPPSymbolsNotMapped) {
|
2016-09-15 07:26:52 +08:00
|
|
|
common.skip('C++ symbols are not mapped for this os.');
|
2018-02-11 11:50:31 +08:00
|
|
|
}
|
2016-09-19 09:24:44 +08:00
|
|
|
|
2016-10-11 14:23:18 +08:00
|
|
|
const base = require('./tick-processor-base.js');
|
2016-09-19 09:24:44 +08:00
|
|
|
|
2016-09-15 07:26:52 +08:00
|
|
|
base.runTest({
|
2017-11-24 07:13:44 +08:00
|
|
|
pattern: /MakeContext/,
|
2016-09-15 07:26:52 +08:00
|
|
|
code: `function f() {
|
2017-11-24 07:13:44 +08:00
|
|
|
require('vm').createContext({});
|
2016-09-15 07:26:52 +08:00
|
|
|
setImmediate(function() { f(); });
|
|
|
|
};
|
|
|
|
f();`
|
|
|
|
});
|