mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 14:43:32 +00:00
pkg/unittest: remove testState
R=sigmund@google.com Review URL: https://codereview.chromium.org//26443003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29307 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
4e67584f5a
commit
c42ec6584d
|
@ -304,15 +304,6 @@ const PASS = 'pass';
|
||||||
const FAIL = 'fail';
|
const FAIL = 'fail';
|
||||||
const ERROR = 'error';
|
const ERROR = 'error';
|
||||||
|
|
||||||
/**
|
|
||||||
* A map that can be used to communicate state between a test driver
|
|
||||||
* or main() function and the tests, particularly when these two
|
|
||||||
* are otherwise independent. For example, a test driver that starts
|
|
||||||
* an HTTP server and then runs tests that access that server could use
|
|
||||||
* this as a way of communicating the server port to the tests.
|
|
||||||
*/
|
|
||||||
Map testState = {};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new test case with the given description and body. The
|
* Creates a new test case with the given description and body. The
|
||||||
* description will include the descriptions of any surrounding group()
|
* description will include the descriptions of any surrounding group()
|
||||||
|
|
|
@ -181,7 +181,6 @@ part '${normalizePath('${config["runnerDir"]}/standard_test_runner.dart')}';
|
||||||
excludeFilters = ${config["exclude"]};
|
excludeFilters = ${config["exclude"]};
|
||||||
tprint = (msg) => print('###\$msg');
|
tprint = (msg) => print('###\$msg');
|
||||||
notifyDone = (e) { exit(e); };
|
notifyDone = (e) { exit(e); };
|
||||||
testState["port"] = $serverPort;
|
|
||||||
''';
|
''';
|
||||||
} else {
|
} else {
|
||||||
directives = '''
|
directives = '''
|
||||||
|
@ -197,7 +196,6 @@ part '${normalizePath('${config["runnerDir"]}/standard_test_runner.dart')}';
|
||||||
excludeFilters = ${config["exclude"]};
|
excludeFilters = ${config["exclude"]};
|
||||||
tprint = (msg) => query('#console').appendText('###\$msg\\n');
|
tprint = (msg) => query('#console').appendText('###\$msg\\n');
|
||||||
notifyDone = (e) => window.postMessage('done', '*');
|
notifyDone = (e) => window.postMessage('done', '*');
|
||||||
testState["port"] = $serverPort;
|
|
||||||
''';
|
''';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +248,6 @@ part '${normalizePath('${config["runnerDir"]}/layout_test_runner.dart')}';
|
||||||
main() {
|
main() {
|
||||||
includeFilters = ${config["include"]};
|
includeFilters = ${config["include"]};
|
||||||
excludeFilters = ${config["exclude"]};
|
excludeFilters = ${config["exclude"]};
|
||||||
unittest.testState["port"] = $serverPort;
|
|
||||||
runTests(test.main);
|
runTests(test.main);
|
||||||
}
|
}
|
||||||
''');
|
''');
|
||||||
|
|
Loading…
Reference in a new issue