Uh oh!
There was an error while loading. Please reload this page.
test: improve test-arm-math-illegal-instruction.js - #37670
Conversation
RaisinTen
left a comment
There was a problem hiding this comment.
What do you think about doing something like this instead:
Object.getOwnPropertyNames(Math).forEach(function(functionName){if(!/[A-Z]/.test(functionName)){// The function names don't have capital letters.Math[functionName](-0.5);}});That way, we don't have to manually keep a track of all the function names.
marsonya
commented
Mar 9, 2021
This seems like a great idea. |
RaisinTen
commented
Mar 9, 2021
I don't think that will be a problem given the purpose of the test: |
marsonya
commented
Mar 9, 2021
That sounds fair. The functions that require more than one parameters are simply returning |
This seems a great solution to me. Let's wait for more reviews. |
aduh95
commented
Mar 10, 2021
+1 on @RaisinTen idea. FWIW we could use |
marsonya
commented
Mar 13, 2021
New changes made as per @RaisinTen's idea. |
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Mar 15, 2021
Instead of writing each Math function and keeping track, loop over Math functions and test each one of them. PR-URL: #37670 Reviewed-By: Darshan Sen <raisinten@gmail.com>
aduh95
commented
Mar 19, 2021
Landed in 67d2262 |
Instead of writing each Math function and keeping track, loop over Math functions and test each one of them. PR-URL: #37670 Reviewed-By: Darshan Sen <raisinten@gmail.com>
Instead of writing each Math function and keeping track, loop over Math functions and test each one of them. PR-URL: #37670 Reviewed-By: Darshan Sen <raisinten@gmail.com>
add
Math.clz32(x)to the test