From 27622d764767dcb3778784884022c2c7de5769b8 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sat, 26 Apr 2025 13:48:11 +0900 Subject: [PATCH] Use `assertNativeFunction` instead of simple regexp pattern --- test/staging/sm/Function/function-bind.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/staging/sm/Function/function-bind.js b/test/staging/sm/Function/function-bind.js index b86eca1d55..d796ae515e 100644 --- a/test/staging/sm/Function/function-bind.js +++ b/test/staging/sm/Function/function-bind.js @@ -4,7 +4,7 @@ */ /*--- -includes: [sm/non262.js, sm/non262-shell.js] +includes: [sm/non262.js, sm/non262-shell.js, nativeFunctionMatcher.js] flags: - noStrict description: | @@ -261,9 +261,7 @@ function testBound(fun) testBound(strict); testBound(nonstrict); -var nativeFunctionRegex = /^function\s*\(\)\s*\{\s*\[native code\]\s*\}$/ -assert.sameValue(nativeFunctionRegex.test((function unbound(){"body"}).bind().toString()), true); - +assertNativeFunction((function unbound(){"body"}).bind()); /* 22. Return F. */ var passim = function p(){}.bind(1);