Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
test: replace [].join() with ''.repeat()#12305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
JacksonTian commented Apr 10, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
hiroppy commented Apr 10, 2017
vsemozhetbyt commented Apr 10, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@abouthiroppy It seems these two cases in node/test/parallel/test-stringbytes-external.js Lines 48 to 49 in 98e54b0
|
hiroppy commented Apr 11, 2017
@vsemozhetbyt Good catch! |
JacksonTian commented Apr 11, 2017
Thanks @vsemozhetbyt@abouthiroppy , done. |
hiroppy commented Apr 11, 2017
| constsize=1+(1<<20); | ||
| write_str=Array(size).join(write_str); | ||
| ucs2_control=Array(size).join(ucs2_control); | ||
| constsize=1<<20; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to change size in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you do the Array.join() it ends up as one less than size, so when you move to repeat you have to decrease size by one to get the same string length.
>Array(3).join('a')'aa'>'a'.repeat(3)'aaa'There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Thanks.
benjamingr commented Apr 16, 2017
CI failure unrelated. Figured we can land this. Landed in 4a782e1 |
Replace [].join calls with the more modern .repeat PR-URL: #12305 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Replace [].join calls with the more modern .repeat PR-URL: #12305 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Replace [].join calls with the more modern .repeat PR-URL: #12305 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Replace [].join calls with the more modern .repeat PR-URL: #12305 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
gibfahn commented May 15, 2017
Should this be backported to v6.x? |
Replace [].join calls with the more modern .repeat PR-URL: #12305 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
gibfahn commented Jun 18, 2017
This only affects |
Replace [].join calls with the more modern .repeat PR-URL: #12305 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Replace [].join calls with the more modern .repeat PR-URL: #12305 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Like PR #12170 .
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test