Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Issue 9664052: - Fix use of String operator + in language and corelib tests. (Closed)

Created:
8 years, 9 months ago by Ivan Posva
Modified:
8 years, 8 months ago
Reviewers:
kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

- Fix use of String operator + in language and corelib tests. Committed: https://code.google.com/p/dart/source/detail?r=6415

Patch Set 1 #

Total comments: 14

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -25 lines) Patch
M tests/corelib/src/RegExpAllMatchesTest.dart View 1 2 2 chunks +10 lines, -10 lines 0 comments Download
M tests/language/src/CallThroughGetterTest.dart View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M tests/language/src/Constructor2Test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/language/src/Constructor3Test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/language/src/Constructor4Test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/language/src/ConstructorNamedArgumentsTest.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/src/ExampleConstructorTest.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/language/src/ExpectTest.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M tests/language/src/InterfaceFactoryMultiTest.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M tests/language/src/InterfaceFactoryTest.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Ivan Posva
Please check that the meaning of the tests has not changed. After this change there ...
8 years, 9 months ago (2012-03-12 05:55:10 UTC) #1
kasperl
LGTM. I think we should be careful not to add too many uses of concat. ...
8 years, 9 months ago (2012-03-12 06:55:42 UTC) #2
Ivan Posva
8 years, 8 months ago (2012-04-11 14:26:00 UTC) #3
https://chromiumcodereview.appspot.com/9664052/diff/1/tests/corelib/src/RegEx...
File tests/corelib/src/RegExpAllMatchesTest.dart (right):

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/corelib/src/RegEx...
tests/corelib/src/RegExpAllMatchesTest.dart:43: var mapped = matches.map((Match
m) => m.group(0).concat("bar"));
On 2012/03/12 06:55:42, kasperl wrote:
> I'd suggest using string interpolation here:
> 
>    => "${m.group(0)}bar"

Done.

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Call...
File tests/language/src/CallThroughGetterTest.dart (right):

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Call...
tests/language/src/CallThroughGetterTest.dart:158: _mark(m) { _order =
_order.concat(m); return _order; }
On 2012/03/12 06:55:42, kasperl wrote:
> This would be cleaner with a string buffer, but I understand if you don't want
> to mess too much with this test.
> 
> Pretty sure something like:
> 
>    _order.add(m); return _order.toString()
> 
> would work fine if you change _order to a StringBuffer.

Done.

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Expe...
File tests/language/src/ExpectTest.dart (right):

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Expe...
tests/language/src/ExpectTest.dart:15: Expect.equals("AB", a.concat("B"));
On 2012/03/12 06:55:42, kasperl wrote:
> String interpolation?

Done.

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Expe...
tests/language/src/ExpectTest.dart:42: var ab = a.concat("B");
On 2012/03/12 06:55:42, kasperl wrote:
> String interpolation?

Done.

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Inte...
File tests/language/src/InterfaceFactoryMultiTest.dart (right):

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Inte...
tests/language/src/InterfaceFactoryMultiTest.dart:17: AImpl(String one, String
two) : _secret = one.concat(two);
On 2012/03/12 06:55:42, kasperl wrote:
> _secret = "${one}${two}"

Done.

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Inte...
tests/language/src/InterfaceFactoryMultiTest.dart:31: BImpl(String one, String
two) : _secret = two.concat(one);
On 2012/03/12 06:55:42, kasperl wrote:
> _secret = "${two}${one}"

Done.

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Inte...
File tests/language/src/InterfaceFactoryTest.dart (right):

https://chromiumcodereview.appspot.com/9664052/diff/1/tests/language/src/Inte...
tests/language/src/InterfaceFactoryTest.dart:45: SomeImplementation(String one,
String two) : _secret = one.concat(two) {}
On 2012/03/12 06:55:42, kasperl wrote:
> _secret = "${one}${two}"

Done.

Powered by Google App Engine
This is Rietveld 408576698