OLD | NEW |
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 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('../../../lib/unittest/unittest.dart'); | 10 #import('../../lib/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 final List list1 = const ["Hello", "World", "Hello", 0xfffffffffff]; | 17 static final List list1 = const ["Hello", "World", "Hello", 0xfffffffffff]; |
18 static final List list2 = const [null, list1, list1, list1, list1]; | 18 static final List list2 = const [null, list1, list1, list1, list1]; |
19 static final List list3 = const [list2, 2.0, true, false, 0xfffffffffff]; | 19 static final List list3 = const [list2, 2.0, true, false, 0xfffffffffff]; |
20 static final Map map1 = const { | 20 static final Map map1 = const { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 Expect.equals(true, replyObject[0][3] == replyObject[4][4]); | 126 Expect.equals(true, replyObject[0][3] == replyObject[4][4]); |
127 }); | 127 }); |
128 | 128 |
129 // Shutdown the MessageServer. | 129 // Shutdown the MessageServer. |
130 remote.call(-1).then(expectAsync1((int message) { | 130 remote.call(-1).then(expectAsync1((int message) { |
131 Expect.equals(MessageTest.elms.length + 1, message); | 131 Expect.equals(MessageTest.elms.length + 1, message); |
132 })); | 132 })); |
133 })); | 133 })); |
134 }); | 134 }); |
135 } | 135 } |
OLD | NEW |