Skip to content

Commit 45c6f70

Browse files
sosukesuzukiMs2ger
authored andcommitted
Use assertNativeFunction instead of simple regexp pattern
1 parent ac9ff9b commit 45c6f70

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/staging/sm/Function/function-bind.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/*---
7-
includes: [sm/non262.js, sm/non262-shell.js]
7+
includes: [sm/non262.js, sm/non262-shell.js, nativeFunctionMatcher.js]
88
flags:
99
- noStrict
1010
description: |
@@ -261,9 +261,7 @@ function testBound(fun)
261261
testBound(strict);
262262
testBound(nonstrict);
263263

264-
var nativeFunctionRegex = /^function\s*\(\)\s*\{\s*\[native code\]\s*\}$/
265-
assert.sameValue(nativeFunctionRegex.test((function unbound(){"body"}).bind().toString()), true);
266-
264+
assertNativeFunction((function unbound(){"body"}).bind());
267265

268266
/* 22. Return F. */
269267
var passim = function p(){}.bind(1);

0 commit comments

Comments
 (0)