2016-09-15 07:26:52 +08:00
|
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
|
2017-07-01 07:29:09 +08:00
|
|
|
if (!common.enoughTestCpu)
|
|
|
|
common.skip('test is CPU-intensive');
|
|
|
|
|
2016-09-15 07:26:52 +08:00
|
|
|
if (common.isWindows ||
|
|
|
|
common.isSunOS ||
|
2017-07-16 15:07:33 +08:00
|
|
|
common.isAIX ||
|
2016-09-15 07:26:52 +08:00
|
|
|
common.isLinuxPPCBE ||
|
2017-07-01 07:29:09 +08:00
|
|
|
common.isFreeBSD)
|
2016-09-15 07:26:52 +08:00
|
|
|
common.skip('C++ symbols are not mapped for this os.');
|
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();`
|
|
|
|
});
|