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

Side by Side Diff: tests/compiler/dart2js/js_backend_cps_ir.dart

Issue 1342213003: Add optional message to assert in Dart2js - continued (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add --assert-message flag Created 5 years, 3 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 4
5 // Test that the CPS IR code generator compiles programs and produces the 5 // Test that the CPS IR code generator compiles programs and produces the
6 // the expected output. 6 // the expected output.
7 7
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import 'package:compiler/src/apiimpl.dart' 10 import 'package:compiler/src/apiimpl.dart'
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 String expectation = test.expectation; 72 String expectation = test.expectation;
73 if (expectation != null) { 73 if (expectation != null) {
74 String expected = test.expectation; 74 String expected = test.expectation;
75 String found = test.elementName == null 75 String found = test.elementName == null
76 ? getCodeForMain(compiler) 76 ? getCodeForMain(compiler)
77 : getCodeForMethod(compiler, test.elementName); 77 : getCodeForMethod(compiler, test.elementName);
78 if (expected != found) { 78 if (expected != found) {
79 Expect.fail('Expected:\n$expected\nbut found\n$found'); 79 Expect.fail('Expected:\n$expected\nbut found\n$found');
80 } 80 }
81 } 81 }
82 } catch (e) { 82 } catch (e, st) {
83 print(e); 83 print(e);
84 print(st);
84 Expect.fail('The following test failed to compile:\n' 85 Expect.fail('The following test failed to compile:\n'
85 '${formatTest(files)}'); 86 '${formatTest(files)}');
86 } 87 }
87 }); 88 });
88 } 89 }
89 } 90 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/backend_dart/dart_printer_test.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698