Skip to content

Conversation

@JacksonTian
Copy link
Contributor

@JacksonTianJacksonTian commented Apr 10, 2017

Like PR #12170 .

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Apr 10, 2017
@hiroppy
Copy link
Member

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Apr 10, 2017

@abouthiroppy It seems these two cases in test-stringbytes-external.js also can be addressed:

write_str=Array(size).join(write_str);
ucs2_control=Array(size).join(ucs2_control);

@hiroppy
Copy link
Member

@vsemozhetbyt Good catch!
@JacksonTian Could you modify these two cases?

@JacksonTian
Copy link
ContributorAuthor

Thanks @vsemozhetbyt@abouthiroppy , done.

@hiroppy
Copy link
Member

constsize=1+(1<<20);
write_str=Array(size).join(write_str);
ucs2_control=Array(size).join(ucs2_control);
constsize=1<<20;
Copy link
Contributor

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?

Copy link
Member

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'

Copy link
Contributor

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
Copy link
Member

CI failure unrelated.

Figured we can land this. Landed in 4a782e1

benjamingr pushed a commit that referenced this pull request Apr 16, 2017
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]>
@JacksonTianJacksonTian deleted the repeat branch April 19, 2017 02:31
evanlucas pushed a commit that referenced this pull request Apr 25, 2017
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]>
@evanlucasevanlucas mentioned this pull request May 1, 2017
evanlucas pushed a commit that referenced this pull request May 1, 2017
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]>
evanlucas pushed a commit that referenced this pull request May 2, 2017
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
Copy link
Member

Should this be backported to v6.x?

@gibfahngibfahn mentioned this pull request Jun 15, 2017
3 tasks
gibfahn pushed a commit that referenced this pull request Jun 18, 2017
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
Copy link
Member

Should this be backported to v6.x?

This only affects test/, so let's say yes

gibfahn pushed a commit that referenced this pull request Jun 20, 2017
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]>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
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]>
@MylesBorinsMylesBorins mentioned this pull request Jul 18, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@JacksonTian@hiroppy@vsemozhetbyt@benjamingr@gibfahn@jasnell@lpinca@watilde@aqrln@nodejs-github-bot