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

Unified Diff: tests/standalone/typed_array_int64_uint64_test.dart

Issue 1477043002: Fix tests that don't catch asynchronous errors from isolate spawning. Update co19 status. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/language/issue23244_test.dart ('k') | tests/standalone/typed_array_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/typed_array_int64_uint64_test.dart
diff --git a/tests/standalone/typed_array_int64_uint64_test.dart b/tests/standalone/typed_array_int64_uint64_test.dart
index 3decb92749dba7c5e18ef60d75136bdbfcf931bd..f62ab53bc7c668d1081f83bf2f3928d323ecb463 100644
--- a/tests/standalone/typed_array_int64_uint64_test.dart
+++ b/tests/standalone/typed_array_int64_uint64_test.dart
@@ -7,12 +7,19 @@
// Library tag to be able to run in html test framework.
library TypedArray;
import "package:expect/expect.dart";
+import 'package:async_helper/async_helper.dart';
+import 'dart:async';
import 'dart:isolate';
import 'dart:typed_data';
-void main() {
- int64_receiver();
- uint64_receiver();
+main() {
+ test(int64_receiver);
+ test(uint64_receiver);
+}
+
+test(f) {
+ asyncStart();
+ return f().whenComplete(asyncEnd);
}
// Int64 array.
@@ -24,15 +31,17 @@ Int64List initInt64() {
}
Int64List int64 = initInt64();
-void int64_receiver() {
+int64_receiver() {
var response = new ReceivePort();
var remote = Isolate.spawn(int64_sender, [int64.length, response.sendPort]);
- response.first.then((a) {
+ asyncStart();
+ return response.first.then((a) {
Expect.equals(int64.length, a.length);
for (int i = 0; i < a.length; i++) {
Expect.equals(int64[i], a[i]);
}
print("int64_receiver");
+ asyncEnd();
});
}
@@ -57,15 +66,17 @@ Uint64List initUint64() {
}
Uint64List uint64 = initUint64();
-void uint64_receiver() {
+uint64_receiver() {
var response = new ReceivePort();
var remote = Isolate.spawn(uint64_sender, [uint64.length, response.sendPort]);
- response.first.then((a) {
+ asyncStart();
+ return response.first.then((a) {
Expect.equals(uint64.length, a.length);
for (int i = 0; i < a.length; i++) {
Expect.equals(uint64[i], a[i]);
}
print("uint64_receiver");
+ asyncEnd();
});
}
« no previous file with comments | « tests/language/issue23244_test.dart ('k') | tests/standalone/typed_array_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698