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

Unified Diff: tests/compiler/dart2js/js_backend_cps_ir_operators2_test.dart

Issue 1576093003: cpsir unittests: move all unittests into individual files and test runners. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/js_backend_cps_ir_operators2_test.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_operators2_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_operators2_test.dart
deleted file mode 100644
index f85e96d30eb1f9a9bbd6bd05790b70e54da89b15..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/js_backend_cps_ir_operators2_test.dart
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Tests of operators.
-
-library operators2_tests;
-
-import 'js_backend_cps_ir.dart';
-
-const List<TestEntry> tests = const [
-
- const TestEntry(r"""
-foo(a, b) => ((a & 0xff0000) >> 1) & b;
-main() {
- print(foo(123, 234));
- print(foo(0, 2));
-}""", r"""
-function() {
- P.print((123 & 16711680) >>> 1 & 234);
- P.print((0 & 16711680) >>> 1 & 2);
-}"""),
-
- const TestEntry(r"""
-foo(a) => ~a;
-main() {
- print(foo(1));
- print(foo(10));
-}""", r"""
-function() {
- P.print(~1 >>> 0);
- P.print(~10 >>> 0);
-}"""),
-
- const TestEntry.forMethod('function(foo)',
- r"""
-foo(a) => a % 13;
-main() {
- print(foo(5));
- print(foo(-100));
-}""", r"""
-function(a) {
- var result = a % 13;
- return result === 0 ? 0 : result > 0 ? result : 13 < 0 ? result - 13 : result + 13;
-}"""),
-
- const TestEntry(r"""
-foo(a) => a % 13;
-main() {
- print(foo(5));
- print(foo(100));
-}""", r"""
-function() {
- P.print(5 % 13);
- P.print(100 % 13);
-}"""),
-
- const TestEntry(r"""
-foo(a) => a.remainder(13);
-main() {
- print(foo(5));
- print(foo(-100));
-}""", r"""
-function() {
- P.print(5 % 13);
- P.print(-100 % 13);
-}"""),
-
- const TestEntry.forMethod('function(foo)',
- r"""
-foo(a) => a ~/ 13;
-main() {
- print(foo(5));
- print(foo(-100));
-}""", r"""
-function(a) {
- return (a | 0) === a && (13 | 0) === 13 ? a / 13 | 0 : J.toInt$0$n(a / 13);
-}"""),
-
- const TestEntry(r"""
-foo(a) => a ~/ 13;
-main() {
- print(foo(5));
- print(foo(100));
-}""", r"""
-function() {
- P.print(5 / 13 | 0);
- P.print(100 / 13 | 0);
-}"""),
-
- const TestEntry.forMethod('function(foo)',
- r"""
-foo(a) => a ~/ 13;
-main() {
- print(foo(5));
- print(foo(8000000000));
-}""", r"""
-function(a) {
- return (a | 0) === a && (13 | 0) === 13 ? a / 13 | 0 : J.toInt$0$n(a / 13);
-}"""),
-
-];
-
-void main() {
- runTests(tests);
-}

Powered by Google App Engine
This is Rietveld 408576698