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

Unified Diff: test/runner/isolate_listener_test.dart

Issue 1379203002: Refactor groups to pipe them through to the runner. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 2 months 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 | « test/runner/engine_test.dart ('k') | test/runner/load_suite_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/isolate_listener_test.dart
diff --git a/test/runner/isolate_listener_test.dart b/test/runner/isolate_listener_test.dart
index 2853725b380017d8c3fe8c376dc3dde9b89cacee..6b4f75c1e86fd7a6c5a9c8de5fa79fda5eec496c 100644
--- a/test/runner/isolate_listener_test.dart
+++ b/test/runner/isolate_listener_test.dart
@@ -38,24 +38,27 @@ void main() {
_liveTest = null;
});
- test("sends a list of available tests on startup", () async {
+ test("sends a list of available tests and groups on startup", () async {
var response = await (await _spawnIsolate(_successfulTests)).first;
expect(response, containsPair("type", "success"));
- expect(response, contains("tests"));
+ expect(response, contains("entries"));
- var tests = response["tests"];
+ var tests = response["entries"];
expect(tests, hasLength(3));
expect(tests[0], containsPair("name", "successful 1"));
expect(tests[1], containsPair("name", "successful 2"));
- expect(tests[2], containsPair("name", "successful 3"));
+ expect(tests[2], containsPair("type", "group"));
+ expect(tests[2], containsPair("name", "successful"));
+ expect(tests[2], contains("entries"));
+ expect(tests[2]["entries"][0], containsPair("name", "successful 3"));
});
test("waits for a returned future sending a response", () async {
var response = await (await _spawnIsolate(_asyncTests)).first;
expect(response, containsPair("type", "success"));
- expect(response, contains("tests"));
+ expect(response, contains("entries"));
- var tests = response["tests"];
+ var tests = response["entries"];
expect(tests, hasLength(3));
expect(tests[0], containsPair("name", "successful 1"));
expect(tests[1], containsPair("name", "successful 2"));
@@ -263,7 +266,8 @@ Future<LiveTest> _isolateTest(void entryPoint(SendPort sendPort)) async {
var response = await (await _spawnIsolate(entryPoint)).first;
expect(response, containsPair("type", "success"));
- var testMap = response["tests"].first;
+ var testMap = response["entries"].first;
+ expect(testMap, containsPair("type", "test"));
var metadata = new Metadata.deserialize(testMap["metadata"]);
var test = new IsolateTest(testMap["name"], metadata, testMap["sendPort"]);
var suite = new Suite([test]);
@@ -308,7 +312,7 @@ void _successfulTests(SendPort sendPort) {
IsolateListener.start(sendPort, new Metadata(), () => () {
test("successful 1", () {});
test("successful 2", () {});
- test("successful 3", () {});
+ group("successful", () => test("3", () {}));
});
}
« no previous file with comments | « test/runner/engine_test.dart ('k') | test/runner/load_suite_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698