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

Side by Side Diff: tests/standalone/unboxed_int_converter_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
« no previous file with comments | « tests/standalone/typed_data_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Test UnboxedIntConverter for int32. 4 // Test UnboxedIntConverter for int32.
5 // VMOptions=--optimization-counter-threshold=10 --no-use-osr 5 // VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-co mpilation
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import "dart:typed_data"; 8 import "dart:typed_data";
9 9
10 int32_add(a, b, c) => (a * c) + (b * c); 10 int32_add(a, b, c) => (a * c) + (b * c);
11 int32_mul(a, b, c) => (a * c) * b; 11 int32_mul(a, b, c) => (a * c) * b;
12 int32_sub(a, b, c) => (a * c) - (b * c); 12 int32_sub(a, b, c) => (a * c) - (b * c);
13 int32_shr(a, b, c) => (a * c * b) >> 16; 13 int32_shr(a, b, c) => (a * c * b) >> 16;
14 int32_shl(a, b, c) => (a * c * b) << 16; 14 int32_shl(a, b, c) => (a * c * b) << 16;
15 int32_xor(a, b, c) => (a * c) ^ (b * c); 15 int32_xor(a, b, c) => (a * c) ^ (b * c);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 Expect.equals(0, int32_shr(1, 1, 1)); 70 Expect.equals(0, int32_shr(1, 1, 1));
71 Expect.equals(1 << 16, int32_shl(1, 1, 1)); 71 Expect.equals(1 << 16, int32_shl(1, 1, 1));
72 72
73 for (var j = 0; j < 1000; j++) { 73 for (var j = 0; j < 1000; j++) {
74 Expect.equals(4294839503, int32_to_mint(0, 1000)); 74 Expect.equals(4294839503, int32_to_mint(0, 1000));
75 Expect.equals(-8, mint_to_int32(2, 0x100000000, 0x100000001)); 75 Expect.equals(-8, mint_to_int32(2, 0x100000000, 0x100000001));
76 Expect.equals(8, uint32_to_int32(2, 0x100000001)); 76 Expect.equals(8, uint32_to_int32(2, 0x100000001));
77 } 77 }
78 Expect.equals(8 * 0x80000001, uint32_to_int32(2, 0x180000001)); 78 Expect.equals(8 * 0x80000001, uint32_to_int32(2, 0x180000001));
79 } 79 }
OLDNEW
« no previous file with comments | « tests/standalone/typed_data_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698