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

Side by Side Diff: tests/language/vm/string_polymorphic_test.dart

Issue 2067453003: Delete stray comment in tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // Tests that the VM does not crash on weird corner cases of class Math.
5 // VMOptions=--optimization_counter_threshold=10 --no-background_compilation 4 // VMOptions=--optimization_counter_threshold=10 --no-background_compilation
6 5
7 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
8 7
9 test1(String a, String b) { 8 test1(String a, String b) {
10 return a == b; 9 return a == b;
11 } 10 }
12 11
13 var LEN = 500; 12 var LEN = 500;
14 13
15 var ITER = 100000 / LEN; 14 var ITER = 100000 / LEN;
16 15
17 measure(fn, a, b) { 16 measure(fn, a, b) {
18 for (var i = 0; i < ITER; i++) { 17 for (var i = 0; i < ITER; i++) {
19 Expect.equals(true, fn(a, b)); 18 Expect.equals(true, fn(a, b));
20 } 19 }
21 } 20 }
22 21
23 main() { 22 main() {
24 var n = LEN; 23 var n = LEN;
25 StringBuffer s = new StringBuffer(); 24 StringBuffer s = new StringBuffer();
26 for (var i=0; i < n; ++i) s.write("A"); 25 for (var i=0; i < n; ++i) s.write("A");
27 String t = s.toString(); 26 String t = s.toString();
28 String u = s.toString(); 27 String u = s.toString();
29 String v = s.toString() + "\u1234"; 28 String v = s.toString() + "\u1234";
30 String w = s.toString() + "\u1234"; 29 String w = s.toString() + "\u1234";
31 for (var i=0; i<10; i++) measure(test1, t, u); 30 for (var i=0; i<10; i++) measure(test1, t, u);
32 for (var i=0; i<10; i++) measure(test1, v, w); 31 for (var i=0; i<10; i++) measure(test1, v, w);
33 } 32 }
OLDNEW
« no previous file with comments | « tests/language/regress_26668_test.dart ('k') | tests/language/vm/typed_data_polymorphic_view_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698