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

Side by Side Diff: tests/language/optimized_string_charat_test.dart

Issue 1759973002: Add --no-background-compilation to tests that expect to run code in optimized form (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: more Created 4 years, 9 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // VMOptions=--optimization-counter-threshold=10 --no-use-osr 4 // VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-co mpilation
5 5
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 7
8 // Test optimized [] on strings. 8 // Test optimized [] on strings.
9 9
10 var a = "abc"; 10 var a = "abc";
11 var b = "øbc"; 11 var b = "øbc";
12 var c = new String.fromCharCodes([123, 456, 789]); 12 var c = new String.fromCharCodes([123, 456, 789]);
13 13
14 test_charat(s, i) { 14 test_charat(s, i) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0)); 60 Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0));
61 for (var i = 0; i < 20; i++) test_charat(c, 0); 61 for (var i = 0; i < 20; i++) test_charat(c, 0);
62 Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0)); 62 Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0));
63 Expect.equals(new String.fromCharCodes([456]), test_charat(c, 1)); 63 Expect.equals(new String.fromCharCodes([456]), test_charat(c, 1));
64 Expect.equals(new String.fromCharCodes([789]), test_charat(c, 2)); 64 Expect.equals(new String.fromCharCodes([789]), test_charat(c, 2));
65 Expect.throws(() => test_charat(c, 3)); 65 Expect.throws(() => test_charat(c, 3));
66 66
67 67
68 } 68 }
OLDNEW
« no previous file with comments | « tests/language/optimized_setter_test.dart ('k') | tests/language/optimized_string_charcodeat_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698