mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 09:08:46 +00:00

Commit 3e1b1dd
missed a few files in test/parallel, this commit
rectifies that.
Only test/parallel/test-url.js still has a copyright header. I left
it in because the original author is neither an io.js contributor nor
a StrongLoop employee.
PR-URL: https://github.com/iojs/io.js/pull/527
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
13 lines
433 B
JavaScript
13 lines
433 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
var v8 = require('v8');
|
|
var vm = require('vm');
|
|
|
|
v8.setFlagsFromString('--allow_natives_syntax');
|
|
assert(eval('%_IsSmi(42)'));
|
|
assert(vm.runInThisContext('%_IsSmi(42)'));
|
|
|
|
v8.setFlagsFromString('--noallow_natives_syntax');
|
|
assert.throws(function() { eval('%_IsSmi(42)') }, SyntaxError);
|
|
assert.throws(function() { vm.runInThisContext('%_IsSmi(42)') }, SyntaxError);
|