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

Unified Diff: tests/language_2/async_and_or_test.dart

Issue 2986093002: Revert two Kernel changes that were causing test failures. (Closed)
Patch Set: Revert "Migrate language/async_backwards... ... language/async_star_take..." Created 3 years, 5 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/language_2/async_and_or_test.dart
diff --git a/tests/language_2/async_and_or_test.dart b/tests/language_2/async_and_or_test.dart
deleted file mode 100644
index 6d1e858d81d66ababf835c65ec3131530b86bf2d..0000000000000000000000000000000000000000
--- a/tests/language_2/async_and_or_test.dart
+++ /dev/null
@@ -1,88 +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.
-import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
-
-@NoInline()
-@AssumeDynamic()
-confuse(x) {
- return x;
-}
-
-test1() async {
- Expect.isFalse(await confuse(false) && await confuse(false));
- Expect.isFalse(await confuse(false) && await confuse(true));
- Expect.isFalse(await confuse(true) && await confuse(false));
- Expect.isTrue(await confuse(true) && await confuse(true));
-
- Expect.isFalse(await confuse(false) || await confuse(false));
- Expect.isTrue(await confuse(false) || await confuse(true));
- Expect.isTrue(await confuse(true) || await confuse(false));
- Expect.isTrue(await confuse(true) || await confuse(true));
-}
-
-String trace;
-
-traceA(x) {
- trace += "a";
- return x;
-}
-
-traceB(x) {
- trace += "b";
- return x;
-}
-
-testEvaluation(void fn()) async {
- trace = "";
- await fn();
-}
-
-test2() async {
- await testEvaluation(() async {
- Expect
- .isFalse(await confuse(traceA(false)) && await confuse(traceB(false)));
- Expect.equals("a", trace);
- });
- await testEvaluation(() async {
- Expect.isFalse(await confuse(traceA(false)) && await confuse(traceB(true)));
- Expect.equals("a", trace);
- });
- await testEvaluation(() async {
- Expect.isFalse(await confuse(traceA(true)) && await confuse(traceB(false)));
- Expect.equals("ab", trace);
- });
- await testEvaluation(() async {
- Expect.isTrue(await confuse(traceA(true)) && await confuse(traceB(true)));
- Expect.equals("ab", trace);
- });
-
- await testEvaluation(() async {
- Expect
- .isFalse(await confuse(traceA(false)) || await confuse(traceB(false)));
- Expect.equals("ab", trace);
- });
- await testEvaluation(() async {
- Expect.isTrue(await confuse(traceA(false)) || await confuse(traceB(true)));
- Expect.equals("ab", trace);
- });
- await testEvaluation(() async {
- Expect.isTrue(await confuse(traceA(true)) || await confuse(traceB(false)));
- Expect.equals("a", trace);
- });
- await testEvaluation(() async {
- Expect.isTrue(await confuse(traceA(true)) || await confuse(traceB(true)));
- Expect.equals("a", trace);
- });
-}
-
-test() async {
- await test1();
- await test2();
-}
-
-main() {
- asyncStart();
- test().then((_) => asyncEnd());
-}
« no previous file with comments | « tests/language_2/assignable_expression_test.dart ('k') | tests/language_2/async_await_catch_regression_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698