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

Unified Diff: tests/standalone/io/test_extension_fail_tester.dart

Issue 11447010: - Add an extension test which throws from native code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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
« no previous file with comments | « tests/standalone/io/test_extension_fail_test.dart ('k') | tests/standalone/io/test_extension_tester.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/test_extension_fail_tester.dart
===================================================================
--- tests/standalone/io/test_extension_fail_tester.dart (revision 0)
+++ tests/standalone/io/test_extension_fail_tester.dart (revision 0)
@@ -0,0 +1,20 @@
+// Copyright (c) 2012, 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.
+
+#library("test_extension_test");
+
+#import("dart:isolate");
+#import('test_extension.dart');
+
+main() {
+ try {
+ Cat.throwMeTheBall("ball");
+ } on String catch (e) {
+ Expect.equals("ball", e);
+ }
+ // Make sure the exception is thrown out to the event handler from C++ code.
+ // The harness expects the string "ball" to be thrown and the process to
+ // end with an unhandled exception.
+ new Timer(0, (_) => Cat.throwMeTheBall("ball"));
+}
« no previous file with comments | « tests/standalone/io/test_extension_fail_test.dart ('k') | tests/standalone/io/test_extension_tester.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698