fix test library names and group tests
R=lrn@google.com
Review URL: https://codereview.chromium.org//1030313003
diff --git a/test/isolaterunner_test.dart b/test/isolaterunner_test.dart
index 9183d7e..ec8c7e2 100644
--- a/test/isolaterunner_test.dart
+++ b/test/isolaterunner_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library dart.pkg.isolate.isolaterunner_test;
+library isolate.test.isolaterunner_test;
import 'dart:async' show Future;
import 'dart:isolate' show Capability;
@@ -16,7 +16,7 @@
test("create-close", testCreateClose);
test("create-run-close", testCreateRunClose);
test("separate-isolates", testSeparateIsolates);
- testIsolateFunctions();
+ group('isolate functions', testIsolateFunctions);
}
Future testCreateClose() {
diff --git a/test/ports_test.dart b/test/ports_test.dart
index 8471c67..a1238e4 100644
--- a/test/ports_test.dart
+++ b/test/ports_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library dart.pkg.isolate.isolaterunner_test;
+library isolate.test.ports_test;
import 'dart:async';
import 'dart:isolate';
@@ -13,15 +13,15 @@
const Duration MS = const Duration(milliseconds: 1);
main() {
- testSingleCallbackPort();
- testSingleCompletePort();
- testSingleResponseFuture();
- testSingleResultFuture();
- testSingleResponseChannel();
+ group('SingleCallbackPort', testSingleCallbackPort);
+ group('SingleCompletePort', testSingleCompletePort);
+ group('SingleResponseFuture', testSingleResponseFuture);
+ group('SingleResponseFuture', testSingleResultFuture);
+ group('SingleResponseChannel', testSingleResponseChannel);
}
void testSingleCallbackPort() {
- test("singleCallbackValue", () {
+ test("Value", () {
Completer completer = new Completer.sync();
SendPort p = singleCallbackPort(completer.complete);
p.send(42);
@@ -30,7 +30,7 @@
});
});
- test("singleCallbackFirstValue", () {
+ test("FirstValue", () {
Completer completer = new Completer.sync();
SendPort p = singleCallbackPort(completer.complete);
p.send(42);
@@ -39,7 +39,7 @@
expect(v, 42);
});
});
- test("singleCallbackValue", () {
+ test("Value", () {
Completer completer = new Completer.sync();
SendPort p = singleCallbackPort(completer.complete);
p.send(42);
@@ -48,7 +48,7 @@
});
});
- test("singleCallbackValueBeforeTimeout", () {
+ test("ValueBeforeTimeout", () {
Completer completer = new Completer.sync();
SendPort p = singleCallbackPort(completer.complete, timeout: MS * 500);
p.send(42);
@@ -57,7 +57,7 @@
});
});
- test("singleCallbackTimeout", () {
+ test("Timeout", () {
Completer completer = new Completer.sync();
singleCallbackPort(completer.complete, timeout: MS * 100, timeoutValue: 37);
return completer.future.then((v) {
@@ -65,7 +65,7 @@
});
});
- test("singleCallbackTimeoutFirst", () {
+ test("TimeoutFirst", () {
Completer completer = new Completer.sync();
SendPort p = singleCallbackPort(completer.complete,
timeout: MS * 100,
@@ -79,7 +79,7 @@
void testSingleCompletePort() {
- test("singleCompleteValue", () {
+ test("Value", () {
Completer completer = new Completer.sync();
SendPort p = singleCompletePort(completer);
p.send(42);
@@ -88,7 +88,7 @@
});
});
- test("singleCompleteValueCallback", () {
+ test("ValueCallback", () {
Completer completer = new Completer.sync();
SendPort p = singleCompletePort(completer, callback: (v) {
expect(42, v);
@@ -100,7 +100,7 @@
});
});
- test("singleCompleteValueCallbackFuture", () {
+ test("ValueCallbackFuture", () {
Completer completer = new Completer.sync();
SendPort p = singleCompletePort(completer, callback: (v) {
expect(42, v);
@@ -113,7 +113,7 @@
});
});
- test("singleCompleteValueCallbackThrows", () {
+ test("ValueCallbackThrows", () {
Completer completer = new Completer.sync();
SendPort p = singleCompletePort(completer, callback: (v) {
expect(42, v);
@@ -127,7 +127,7 @@
});
});
- test("singleCompleteValueCallbackThrowsFuture", () {
+ test("ValueCallbackThrowsFuture", () {
Completer completer = new Completer.sync();
SendPort p = singleCompletePort(completer, callback: (v) {
expect(42, v);
@@ -141,7 +141,7 @@
});
});
- test("singleCompleteFirstValue", () {
+ test("FirstValue", () {
Completer completer = new Completer.sync();
SendPort p = singleCompletePort(completer);
p.send(42);
@@ -151,7 +151,7 @@
});
});
- test("singleCompleteFirstValueCallback", () {
+ test("FirstValueCallback", () {
Completer completer = new Completer.sync();
SendPort p = singleCompletePort(completer, callback: (v) {
expect(v, 42);
@@ -164,7 +164,7 @@
});
});
- test("singleCompleteValueBeforeTimeout", () {
+ test("ValueBeforeTimeout", () {
Completer completer = new Completer.sync();
SendPort p = singleCompletePort(completer, timeout: MS * 500);
p.send(42);
@@ -173,7 +173,7 @@
});
});
- test("singleCompleteTimeout", () {
+ test("Timeout", () {
Completer completer = new Completer.sync();
singleCompletePort(completer, timeout: MS * 100);
return completer.future.then((v) {
@@ -183,7 +183,7 @@
});
});
- test("singleCompleteTimeoutCallback", () {
+ test("TimeoutCallback", () {
Completer completer = new Completer.sync();
singleCompletePort(completer, timeout: MS * 100, onTimeout: () => 87);
return completer.future.then((v) {
@@ -191,7 +191,7 @@
});
});
- test("singleCompleteTimeoutCallbackThrows", () {
+ test("TimeoutCallbackThrows", () {
Completer completer = new Completer.sync();
singleCompletePort(completer, timeout: MS * 100, onTimeout: () => throw 91);
return completer.future.then((v) {
@@ -201,7 +201,7 @@
});
});
- test("singleCompleteTimeoutCallbackFuture", () {
+ test("TimeoutCallbackFuture", () {
Completer completer = new Completer.sync();
singleCompletePort(completer,
timeout: MS * 100,
@@ -211,7 +211,7 @@
});
});
- test("singleCompleteTimeoutCallbackThrowsFuture", () {
+ test("TimeoutCallbackThrowsFuture", () {
Completer completer = new Completer.sync();
singleCompletePort(completer,
timeout: MS * 100,
@@ -223,7 +223,7 @@
});
});
- test("singleCompleteTimeoutCallbackSLow", () {
+ test("TimeoutCallbackSLow", () {
Completer completer = new Completer.sync();
singleCompletePort(
completer,
@@ -234,7 +234,7 @@
});
});
- test("singleCompleteTimeoutCallbackThrowsSlow", () {
+ test("TimeoutCallbackThrowsSlow", () {
Completer completer = new Completer.sync();
singleCompletePort(
completer,
@@ -247,7 +247,7 @@
});
});
- test("singleCompleteTimeoutFirst", () {
+ test("TimeoutFirst", () {
Completer completer = new Completer.sync();
SendPort p =
singleCompletePort(completer, timeout: MS * 100, onTimeout: () => 37);
@@ -259,7 +259,7 @@
}
void testSingleResponseFuture() {
- test("singleResponseFutureValue", () {
+ test("FutureValue", () {
return singleResponseFuture((SendPort p) {
p.send(42);
}).then((v) {
@@ -267,7 +267,7 @@
});
});
- test("singleResponseFutureValueFirst", () {
+ test("FutureValueFirst", () {
return singleResponseFuture((SendPort p) {
p.send(42);
p.send(37);
@@ -276,7 +276,7 @@
});
});
- test("singleResponseFutureError", () {
+ test("FutureError", () {
return singleResponseFuture((SendPort p) {
throw 93;
}).then((v) {
@@ -286,7 +286,7 @@
});
});
- test("singleResponseFutureTimeout", () {
+ test("FutureTimeout", () {
return singleResponseFuture((SendPort p) {
// no-op.
}, timeout: MS * 100).then((v) {
@@ -294,7 +294,7 @@
});
});
- test("singleResponseFutureTimeoutValue", () {
+ test("FutureTimeoutValue", () {
return singleResponseFuture((SendPort p) {
// no-op.
}, timeout: MS * 100, timeoutValue: 42).then((v) {
@@ -304,7 +304,7 @@
}
void testSingleResultFuture() {
- test("singleResultFutureValue", () {
+ test("Value", () {
return singleResultFuture((SendPort p) {
sendFutureResult(new Future.value(42), p);
}).then((v) {
@@ -312,7 +312,7 @@
});
});
- test("singleResultFutureValueFirst", () {
+ test("ValueFirst", () {
return singleResultFuture((SendPort p) {
sendFutureResult(new Future.value(42), p);
sendFutureResult(new Future.value(37), p);
@@ -321,7 +321,7 @@
});
});
- test("singleResultFutureError", () {
+ test("Error", () {
return singleResultFuture((SendPort p) {
sendFutureResult(new Future.error(94), p);
}).then((v) {
@@ -331,7 +331,7 @@
});
});
- test("singleResultFutureErrorFirst", () {
+ test("ErrorFirst", () {
return singleResultFuture((SendPort p) {
sendFutureResult(new Future.error(95), p);
sendFutureResult(new Future.error(96), p);
@@ -342,7 +342,7 @@
});
});
- test("singleResultFutureError", () {
+ test("Error", () {
return singleResultFuture((SendPort p) {
throw 93;
}).then((v) {
@@ -352,7 +352,7 @@
});
});
- test("singleResultFutureTimeout", () {
+ test("Timeout", () {
return singleResultFuture((SendPort p) {
// no-op.
}, timeout: MS * 100).then((v) {
@@ -362,7 +362,7 @@
});
});
- test("singleResultFutureTimeoutValue", () {
+ test("TimeoutValue", () {
return singleResultFuture((SendPort p) {
// no-op.
}, timeout: MS * 100, onTimeout: () => 42).then((v) {
@@ -370,7 +370,7 @@
});
});
- test("singleResultFutureTimeoutError", () {
+ test("TimeoutError", () {
return singleResultFuture((SendPort p) {
// no-op.
}, timeout: MS * 100, onTimeout: () => throw 97).then((v) {
@@ -382,7 +382,7 @@
}
void testSingleResponseChannel() {
- test("singleResponseChannelValue", () {
+ test("Value", () {
var channel = new SingleResponseChannel();
channel.port.send(42);
return channel.result.then((v) {
@@ -390,7 +390,7 @@
});
});
- test("singleResponseChannelValueFirst", () {
+ test("ValueFirst", () {
var channel = new SingleResponseChannel();
channel.port.send(42);
channel.port.send(37);
@@ -399,7 +399,7 @@
});
});
- test("singleResponseChannelValueCallback", () {
+ test("ValueCallback", () {
var channel = new SingleResponseChannel(callback: (v) => v * 2);
channel.port.send(42);
return channel.result.then((v) {
@@ -407,7 +407,7 @@
});
});
- test("singleResponseChannelErrorCallback", () {
+ test("ErrorCallback", () {
var channel = new SingleResponseChannel(callback: (v) => throw 42);
channel.port.send(37);
return channel.result.then((v) { fail("unreachable"); },
@@ -416,7 +416,7 @@
});
});
- test("singleResponseChannelAsyncValueCallback", () {
+ test("AsyncValueCallback", () {
var channel = new SingleResponseChannel(
callback: (v) => new Future.value(v * 2));
channel.port.send(42);
@@ -425,7 +425,7 @@
});
});
- test("singleResponseChannelAsyncErrorCallback", () {
+ test("AsyncErrorCallback", () {
var channel = new SingleResponseChannel(callback:
(v) => new Future.error(42));
channel.port.send(37);
@@ -435,14 +435,14 @@
});
});
- test("singleResponseChannelTimeout", () {
+ test("Timeout", () {
var channel = new SingleResponseChannel(timeout: MS * 100);
return channel.result.then((v) {
expect(v, null);
});
});
- test("singleResponseChannelTimeoutThrow", () {
+ test("TimeoutThrow", () {
var channel = new SingleResponseChannel(timeout: MS * 100,
throwOnTimeout: true);
return channel.result.then((v) { fail("unreachable"); },
@@ -451,7 +451,7 @@
});
});
- test("singleResponseChannelTimeoutThrowOnTimeoutAndValue", () {
+ test("TimeoutThrowOnTimeoutAndValue", () {
var channel = new SingleResponseChannel(timeout: MS * 100,
throwOnTimeout: true,
onTimeout: () => 42,
@@ -462,7 +462,7 @@
});
});
- test("singleResponseChannelTimeoutOnTimeout", () {
+ test("TimeoutOnTimeout", () {
var channel = new SingleResponseChannel(timeout: MS * 100,
onTimeout: () => 42);
return channel.result.then((v) {
@@ -470,7 +470,7 @@
});
});
- test("singleResponseChannelTimeoutOnTimeoutAndValue", () {
+ test("TimeoutOnTimeoutAndValue", () {
var channel = new SingleResponseChannel(timeout: MS * 100,
onTimeout: () => 42,
timeoutValue: 37);
@@ -479,7 +479,7 @@
});
});
- test("singleResponseChannelTimeoutValue", () {
+ test("TimeoutValue", () {
var channel = new SingleResponseChannel(timeout: MS * 100,
timeoutValue: 42);
return channel.result.then((v) {
@@ -487,7 +487,7 @@
});
});
- test("singleResponseChannelTimeoutOnTimeoutError", () {
+ test("TimeoutOnTimeoutError", () {
var channel = new SingleResponseChannel(timeout: MS * 100,
onTimeout: () => throw 42);
return channel.result.then((v) { fail("unreachable"); },
@@ -496,7 +496,7 @@
});
});
- test("singleResponseChannelTimeoutOnTimeoutAsync", () {
+ test("TimeoutOnTimeoutAsync", () {
var channel = new SingleResponseChannel(timeout: MS * 100,
onTimeout:
() => new Future.value(42));
@@ -505,7 +505,7 @@
});
});
- test("singleResponseChannelTimeoutOnTimeoutAsyncError", () {
+ test("TimeoutOnTimeoutAsyncError", () {
var channel = new SingleResponseChannel(timeout: MS * 100,
onTimeout:
() => new Future.error(42));
diff --git a/test/registry_test.dart b/test/registry_test.dart
index d03623b..48d917d 100644
--- a/test/registry_test.dart
+++ b/test/registry_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library dart.pkg.isolate.test.registry;
+library isolate.test.registry_test;
import 'dart:async';
import 'dart:isolate';
@@ -15,14 +15,14 @@
const MS = const Duration(milliseconds: 1);
void main() {
- testLookup();
- testAddLookup();
- testAddRemoveTags();
- testRemove();
- testCrossIsolate();
- testTimeout();
- testMultiRegistry();
- testObjectsAndTags();
+ group('lookup', testLookup);
+ group('AddLookup', testAddLookup);
+ group('AddRemoveTags', testAddRemoveTags);
+ group('Remove', testRemove);
+ group('CrossIsolate', testCrossIsolate);
+ group('Timeout', testTimeout);
+ group('MultiRegistry', testMultiRegistry);
+ group('ObjectsAndTags', testObjectsAndTags);
}
class Oddity {
@@ -35,7 +35,7 @@
}
void testLookup() {
- test("lookupAll", () {
+ test("All", () {
RegistryManager regman = new RegistryManager();
Registry registry = regman.registry;
return waitAll(10, (i) {
@@ -52,7 +52,7 @@
.whenComplete(regman.close);
});
- test("lookupOdd", () {
+ test("Odd", () {
RegistryManager regman = new RegistryManager();
Registry registry = regman.registry;
return waitAll(10, (i) {
@@ -69,7 +69,7 @@
.whenComplete(regman.close);
});
- test("lookupMax", () {
+ test("Max", () {
RegistryManager regman = new RegistryManager();
Registry registry = regman.registry;
return waitAll(10, (i) {
@@ -84,7 +84,7 @@
.whenComplete(regman.close);
});
- test("lookupMultiTag", () {
+ test("MultiTag", () {
RegistryManager regman = new RegistryManager();
Registry registry = regman.registry;
return waitAll(25, (i) {
@@ -105,7 +105,7 @@
.whenComplete(regman.close);
});
- test("lookupMultiTagMax", () {
+ test("MultiTagMax", () {
RegistryManager regman = new RegistryManager();
Registry registry = regman.registry;
return waitAll(25, (i) {