Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: adapt test-v8-flags to V8 9.3
%_IsSmi was removed. %IsSmi can be used instead.

Refs: v8/v8@863a2d6
  • Loading branch information
targos committed Aug 29, 2021
commit 50f6f65f6d9d3041b093d80e21f8ad14542a30a8
8 changes: 4 additions & 4 deletions test/parallel/test-v8-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const vm = require('vm');
// Specifically here, V8 may cache compiled scripts between the flip of the
// flag. We use a different script each time to work around this problem.
v8.setFlagsFromString('--allow_natives_syntax');
assert(eval('%_IsSmi(42)'));
assert(vm.runInThisContext('%_IsSmi(43)'));
assert(eval('%IsSmi(42)'));
assert(vm.runInThisContext('%IsSmi(43)'));

v8.setFlagsFromString('--noallow_natives_syntax');
assert.throws(function() { eval('%_IsSmi(44)'); },
assert.throws(function() { eval('%IsSmi(44)'); },
/^SyntaxError: Unexpected token '%'$/);
assert.throws(function() { vm.runInThisContext('%_IsSmi(45)'); },
assert.throws(function() { vm.runInThisContext('%IsSmi(45)'); },
/^SyntaxError: Unexpected token '%'$/);