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

Side by Side Diff: tests/isolate/src/Isolate3NegativeTest.dart

Issue 9422019: isolates refactor: this change introduces 'dart:isolate' as a library. This is a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 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) 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 // Dart test program for testing that errors thrown from isolates are 5 // Dart test program for testing that errors thrown from isolates are
6 // processed correctly and don't result in crashes. 6 // processed correctly and don't result in crashes.
7 7
8 #library('Isolate3NegativeTest'); 8 #library('Isolate3NegativeTest');
9 #import("TestFramework.dart"); 9 #import('dart:isolate');
10 #import('TestFramework.dart');
10 11
11 class TestClass { 12 class TestClass {
12 TestClass.named(num this.fld1) : fld2=fld1 { 13 TestClass.named(num this.fld1) : fld2=fld1 {
13 TestClass.i = 0; // Should cause a compilation error. 14 TestClass.i = 0; // Should cause a compilation error.
14 } 15 }
15 num fld1; 16 num fld1;
16 num fld2; 17 num fld2;
17 } 18 }
18 19
19 class Isolate3NegativeTest extends Isolate { 20 class Isolate3NegativeTest extends Isolate {
(...skipping 13 matching lines...) Expand all
33 } 34 }
34 void spawn_callback(SendPort port) { 35 void spawn_callback(SendPort port) {
35 port.call("foo").receive(expect.runs2(msg_callback)); 36 port.call("foo").receive(expect.runs2(msg_callback));
36 } 37 }
37 expect.completes(new Isolate3NegativeTest().spawn()).then(spawn_callback); 38 expect.completes(new Isolate3NegativeTest().spawn()).then(spawn_callback);
38 } 39 }
39 40
40 main() { 41 main() {
41 runTests([test]); 42 runTests([test]);
42 } 43 }
OLDNEW
« no previous file with comments | « tests/isolate/src/Isolate2NegativeTest.dart ('k') | tests/isolate/src/IsolateComplexMessagesTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698