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

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

Issue 2037123002: Cleanup: remove package "analyzer2dart". (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « pkg/analyzer2dart/test/sexpr_test.dart ('k') | pkg/analyzer2dart/test/tree_shaker_test.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
deleted file mode 100644
index 86a52b0754c3f6910b82be347e74a17386eadc7f..0000000000000000000000000000000000000000
--- a/pkg/analyzer2dart/test/test_helper.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// 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.
-
-/// Helpers for defining input/output based unittests through (constant) data.
-
-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<TestSpecBase> results;
-
- const Group(this.name, this.results);
-}
-
-/// A [input] for which a certain processing result is expected.
-class TestSpecBase {
- final String input;
-
- const TestSpecBase(this.input);
-}
-
-typedef TestGroup(Group group, RunTest check);
-typedef RunTest(TestSpecBase result);
-
-/// Test [data] using [testGroup] and [check].
-void performTests(List<Group> data,
- TestGroup testGroup,
- RunTest runTest,
- List<String> groupsToRun) {
- for (Group group in data) {
- if (groupsToRun.isNotEmpty &&
- !groupsToRun.contains(group.name)) {
- // Skip this group.
- continue;
- }
- testGroup(group, runTest);
- }
-}
-
-/// Test group using unittest.
-unittester(Group group, RunTest runTest) {
- test(group.name, () {
- for (TestSpecBase result in group.results) {
- runTest(result);
- }
- });
-}
« no previous file with comments | « pkg/analyzer2dart/test/sexpr_test.dart ('k') | pkg/analyzer2dart/test/tree_shaker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698