2017-08-21 20:01:06 +02:00
|
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
2018-08-22 17:14:31 +02:00
|
|
|
const { isCPPSymbolsNotMapped } = require('./util');
|
2017-08-21 20:01:06 +02:00
|
|
|
|
|
|
|
if (!common.enoughTestCpu)
|
|
|
|
common.skip('test is CPU-intensive');
|
|
|
|
|
2018-08-22 17:14:31 +02:00
|
|
|
if (isCPPSymbolsNotMapped) {
|
2017-08-21 20:01:06 +02:00
|
|
|
common.skip('C++ symbols are not mapped for this os.');
|
2018-02-11 04:50:31 +01:00
|
|
|
}
|
2017-08-21 20:01:06 +02:00
|
|
|
|
|
|
|
const base = require('./tick-processor-base.js');
|
|
|
|
|
|
|
|
base.runTest({
|
|
|
|
pattern: /^{/,
|
|
|
|
code: `function f() {
|
2017-11-24 00:13:44 +01:00
|
|
|
require('vm').createContext({});
|
2017-08-21 20:01:06 +02:00
|
|
|
setImmediate(function() { f(); });
|
|
|
|
};
|
|
|
|
f();`,
|
|
|
|
profProcessFlags: ['--preprocess']
|
|
|
|
});
|