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

Unified Diff: pkg/analyzer2dart/test/test_helper.dart

Issue 762213002: Support top-level field declaration and assignment in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years 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 | « pkg/analyzer2dart/test/sexpr_test.dart ('k') | pkg/compiler/lib/src/cps_ir/constant_propagation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer2dart/test/test_helper.dart
diff --git a/pkg/analyzer2dart/test/test_helper.dart b/pkg/analyzer2dart/test/test_helper.dart
index e8e5a92511b3b95563a617089c0e94ac359f5960..9bb0b4af6ab7c2ff5fd8353174918eeed2426adc 100644
--- a/pkg/analyzer2dart/test/test_helper.dart
+++ b/pkg/analyzer2dart/test/test_helper.dart
@@ -9,22 +9,20 @@ import 'package:unittest/unittest.dart';
/// A unittest group with a name and a list of input/output results.
class Group {
final String name;
- final List<TestSpec> results;
+ final List<TestSpecBase> results;
const Group(this.name, this.results);
}
-/// A input/output pair that defines the expected [output] of when processing
-/// the [input].
-class TestSpec {
+/// A [input] for which a certain processing result is expected.
+class TestSpecBase {
final String input;
- final String output;
- const TestSpec(this.input, this.output);
+ const TestSpecBase(this.input);
}
typedef TestGroup(Group group, RunTest check);
-typedef RunTest(TestSpec result);
+typedef RunTest(TestSpecBase result);
/// Test [data] using [testGroup] and [check].
void performTests(List<Group> data, TestGroup testGroup, RunTest runTest) {
@@ -36,7 +34,7 @@ void performTests(List<Group> data, TestGroup testGroup, RunTest runTest) {
/// Test group using unittest.
unittester(Group group, RunTest runTest) {
test(group.name, () {
- for (TestSpec result in group.results) {
+ for (TestSpecBase result in group.results) {
runTest(result);
}
});
« no previous file with comments | « pkg/analyzer2dart/test/sexpr_test.dart ('k') | pkg/compiler/lib/src/cps_ir/constant_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698