| OLD | NEW |
| 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 | 4 |
| 5 // Dart test program for testing serialization of messages. | 5 // Dart test program for testing serialization of messages. |
| 6 // VMOptions=--enable_type_checks --enable_asserts | 6 // VMOptions=--enable_type_checks --enable_asserts |
| 7 | 7 |
| 8 #library('MessageTest'); | 8 #library('MessageTest'); |
| 9 #import("dart:isolate"); | 9 #import("dart:isolate"); |
| 10 #import('../../pkg/unittest/lib/unittest.dart'); | 10 #import('../../pkg/unittest/unittest.dart'); |
| 11 | 11 |
| 12 // --------------------------------------------------------------------------- | 12 // --------------------------------------------------------------------------- |
| 13 // Message passing test. | 13 // Message passing test. |
| 14 // --------------------------------------------------------------------------- | 14 // --------------------------------------------------------------------------- |
| 15 | 15 |
| 16 class MessageTest { | 16 class MessageTest { |
| 17 static const List list1 = const ["Hello", "World", "Hello", 0xfffffffffff]; | 17 static const List list1 = const ["Hello", "World", "Hello", 0xfffffffffff]; |
| 18 static const List list2 = const [null, list1, list1, list1, list1]; | 18 static const List list2 = const [null, list1, list1, list1, list1]; |
| 19 static const List list3 = const [list2, 2.0, true, false, 0xfffffffffff]; | 19 static const List list3 = const [list2, 2.0, true, false, 0xfffffffffff]; |
| 20 static const Map map1 = const { | 20 static const Map map1 = const { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // Bigint literals are not canonicalized so do a == check. | 119 // Bigint literals are not canonicalized so do a == check. |
| 120 Expect.equals(true, replyObject[0][3] == replyObject[4][4]); | 120 Expect.equals(true, replyObject[0][3] == replyObject[4][4]); |
| 121 }); | 121 }); |
| 122 | 122 |
| 123 // Shutdown the MessageServer. | 123 // Shutdown the MessageServer. |
| 124 remote.call(-1).then(expectAsync1((int message) { | 124 remote.call(-1).then(expectAsync1((int message) { |
| 125 Expect.equals(MessageTest.elms.length + 1, message); | 125 Expect.equals(MessageTest.elms.length + 1, message); |
| 126 })); | 126 })); |
| 127 }); | 127 }); |
| 128 } | 128 } |
| OLD | NEW |