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

Side by Side Diff: tests/language/type_cast_vm_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // VMOptions=--no_show_internal_names 4 // VMOptions=--no_show_internal_names
5 //
5 // Dart test program testing type casts. 6 // Dart test program testing type casts.
6 import "package:expect/expect.dart";
7 7
8 // Test that the initializer expression gets properly skipped. 8 // Test that the initializer expression gets properly skipped.
9 bool b = "foo" as double; 9 bool b = "foo" as double;
10 10
11 class TypeTest { 11 class TypeTest {
12 static test() { 12 static test() {
13 int result = 0; 13 int result = 0;
14 try { 14 try {
15 var i = "hello" as int; // Throws a CastError 15 var i = "hello" as int; // Throws a CastError
16 } on TypeError catch (error) { 16 } on TypeError catch (error) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 Expect.equals(1, testReturn()); 153 Expect.equals(1, testReturn());
154 Expect.equals(1, testField()); 154 Expect.equals(1, testField());
155 Expect.equals(1, testAnyFunction()); 155 Expect.equals(1, testAnyFunction());
156 } 156 }
157 } 157 }
158 158
159 159
160 main() { 160 main() {
161 TypeTest.testMain(); 161 TypeTest.testMain();
162 } 162 }
OLDNEW
« no previous file with comments | « tests/language/try_catch_test.dart ('k') | tests/language/type_checks_in_factory_method_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698