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

Unified Diff: pkg/unittest/lib/src/group_context.dart

Issue 807193003: Re-apply "Remove unittest and matcher from the repo." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes 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/unittest/lib/src/configuration.dart ('k') | pkg/unittest/lib/src/simple_configuration.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/group_context.dart
diff --git a/pkg/unittest/lib/src/group_context.dart b/pkg/unittest/lib/src/group_context.dart
deleted file mode 100644
index d44b6cd3fec4a21a7c82ab2795b99fa5cd06e5ce..0000000000000000000000000000000000000000
--- a/pkg/unittest/lib/src/group_context.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-part of unittest;
-
-/// Setup and teardown functions for a group and its parents, the latter
-/// for chaining.
-class _GroupContext {
- final _GroupContext parent;
-
- /// Description text of the current test group.
- final String _name;
-
- /// Setup function called before each test in a group.
- Function _testSetup;
-
- get testSetup => _testSetup;
-
- get parentSetup => (parent == null) ? null : parent.testSetup;
-
- set testSetup(Function setup) {
- var preSetup = parentSetup;
- if (preSetup == null) {
- _testSetup = setup;
- } else {
- _testSetup = () {
- var f = preSetup();
- if (f is Future) {
- return f.then((_) => setup());
- } else {
- return setup();
- }
- };
- }
- }
-
- /// Teardown function called after each test in a group.
- Function _testTeardown;
-
- get testTeardown => _testTeardown;
-
- get parentTeardown => (parent == null) ? null : parent.testTeardown;
-
- set testTeardown(Function teardown) {
- var postTeardown = parentTeardown;
- if (postTeardown == null) {
- _testTeardown = teardown;
- } else {
- _testTeardown = () {
- var f = teardown();
- if (f is Future) {
- return f.then((_) => postTeardown());
- } else {
- return postTeardown();
- }
- };
- }
- }
-
- String get fullName => (parent == null || parent == _environment.rootContext)
- ? _name
- : "${parent.fullName}$groupSep$_name";
-
- _GroupContext([this.parent, this._name = '']) {
- _testSetup = parentSetup;
- _testTeardown = parentTeardown;
- }
-}
« no previous file with comments | « pkg/unittest/lib/src/configuration.dart ('k') | pkg/unittest/lib/src/simple_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698