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

Side by Side Diff: tests/compiler/dart2js_native/native_exceptions1_frog_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 import "package:expect/expect.dart";
6
5 // Test that hidden native exception classes can be marked as existing. 7 // Test that hidden native exception classes can be marked as existing.
6 // 8 //
7 // To infer which native hidden types exist, we need 9 // To infer which native hidden types exist, we need
8 // (1) return types of native methods and getters 10 // (1) return types of native methods and getters
9 // (2) argument types of callbacks 11 // (2) argument types of callbacks
10 // (3) exceptions thrown by the operation. 12 // (3) exceptions thrown by the operation.
11 // 13 //
12 // (1) and (2) can be achieved by having nicely typed native methods, but there 14 // (1) and (2) can be achieved by having nicely typed native methods, but there
13 // is no place in the Dart language to communicate (3). So we use the following 15 // is no place in the Dart language to communicate (3). So we use the following
14 // fake body technique. 16 // fake body technique.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 threw = false; 92 threw = false;
91 try { 93 try {
92 var x = aa.op(51); 94 var x = aa.op(51);
93 } on E catch (e) { 95 } on E catch (e) {
94 threw = true; 96 threw = true;
95 Expect.equals(100, e.code); 97 Expect.equals(100, e.code);
96 Expect.isTrue(e is E); 98 Expect.isTrue(e is E);
97 } 99 }
98 Expect.isTrue(threw); 100 Expect.isTrue(threw);
99 } 101 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_native/native_equals_frog_test.dart ('k') | tests/compiler/dart2js_native/native_field_name_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698