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

Side by Side Diff: pkg/unittest/lib/src/group_context.dart

Issue 709903004: Enhance the Dart unittest library to support multiple invocations in the same application run. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 part of unittest; 1 part of unittest;
2 2
3 /// Setup and teardown functions for a group and its parents, the latter 3 /// Setup and teardown functions for a group and its parents, the latter
4 /// for chaining. 4 /// for chaining.
5 class _GroupContext { 5 class _GroupContext {
6 final _GroupContext parent; 6 final _GroupContext parent;
7 7
8 /// Description text of the current test group. 8 /// Description text of the current test group.
9 final String _name; 9 final String _name;
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 var f = teardown(); 47 var f = teardown();
48 if (f is Future) { 48 if (f is Future) {
49 return f.then((_) => postTeardown()); 49 return f.then((_) => postTeardown());
50 } else { 50 } else {
51 return postTeardown(); 51 return postTeardown();
52 } 52 }
53 }; 53 };
54 } 54 }
55 } 55 }
56 56
57 String get fullName => (parent == null || parent == _rootContext) 57 String get fullName => (parent == null || parent == _environment.rootContext)
58 ? _name 58 ? _name
59 : "${parent.fullName}$groupSep$_name"; 59 : "${parent.fullName}$groupSep$_name";
60 60
61 _GroupContext([this.parent, this._name = '']) { 61 _GroupContext([this.parent, this._name = '']) {
62 _testSetup = parentSetup; 62 _testSetup = parentSetup;
63 _testTeardown = parentTeardown; 63 _testTeardown = parentTeardown;
64 } 64 }
65 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698