OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:isolate'; | 6 import 'dart:isolate'; |
7 import 'dart:mojo_core'; | |
8 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
| 8 import 'mojo:core'; |
9 | 9 |
10 import 'package:mojo/dart/testing/expect.dart'; | 10 import 'package:mojo/dart/testing/expect.dart'; |
11 | 11 |
12 void simpleTest() { | 12 void simpleTest() { |
13 var pipe = new MojoMessagePipe(); | 13 var pipe = new MojoMessagePipe(); |
14 Expect.isNotNull(pipe); | 14 Expect.isNotNull(pipe); |
15 | 15 |
16 var endpoint = pipe.endpoints[0]; | 16 var endpoint = pipe.endpoints[0]; |
17 Expect.isTrue(endpoint.handle.isValid); | 17 Expect.isTrue(endpoint.handle.isValid); |
18 | 18 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 Expect.equals(10, pings); | 140 Expect.equals(10, pings); |
141 Expect.equals(10, pongs); | 141 Expect.equals(10, pongs); |
142 } | 142 } |
143 | 143 |
144 | 144 |
145 main() async { | 145 main() async { |
146 simpleTest(); | 146 simpleTest(); |
147 await simpleAsyncAwaitTest(); | 147 await simpleAsyncAwaitTest(); |
148 await pingPongTest(); | 148 await pingPongTest(); |
149 } | 149 } |
OLD | NEW |