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

Side by Side Diff: pkg/kernel/testcases/reify/test_base.dart

Issue 2697873007: Merge the work on Generic Types Reification from 'dart-lang/reify' repo (Closed)
Patch Set: Get back parameter erroneously removed by previous commit Created 3 years, 10 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
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 library test_base;
6
7 expectIs(expected, actual, [String note]) {
8 if (expected != actual) {
9 if (note != null) {
10 throw "Expected: '$expected': $note, actual: '$actual'";
11 }
12 throw "Expected: '$expected', actual: '$actual'";
13 }
14 }
15
16 expectTrue(actual) => expectIs(true, actual);
17
18 expectFalse(actual) => expectIs(false, actual);
19
20 expectThrows(f(), test(e)) {
21 var exception = false;
22 String note = null;
23 try {
24 f();
25 } catch (e) {
26 exception = test(e);
27 if (!exception) {
28 note = "$e [${e.runtimeType}]";
29 }
30 }
31 expectIs(true, exception, note);
32 }
33
34 expectOutput(String expected) => expectIs(expected, output);
35
36 String output;
37
38 write(o) {
39 output = output == null ? "$o" : "$output\n$o";
40 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/reify/super3_test.dart.expect ('k') | pkg/kernel/testcases/reify/typevariable1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698