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

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

Issue 13935016: pkg/unittest: GroupContext should be private (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/unittest.dart
diff --git a/pkg/unittest/lib/unittest.dart b/pkg/unittest/lib/unittest.dart
index b2abf06978991122605c7f5a6cdab8c041606307..032b4d51eeda19c1488a6b3e4bc23a9006c6e446 100644
--- a/pkg/unittest/lib/unittest.dart
+++ b/pkg/unittest/lib/unittest.dart
@@ -217,8 +217,8 @@ final List<TestCase> testCases = new UnmodifiableListView<TestCase>(_testCases);
* Setup and teardown functions for a group and its parents, the latter
* for chaining.
*/
-class GroupContext {
- final GroupContext parent;
+class _GroupContext {
+ final _GroupContext parent;
/** Description text of the current test group. */
final String _name;
@@ -273,7 +273,7 @@ class GroupContext {
? _name
: "${parent.fullName}$groupSep$_name";
- GroupContext([this.parent, this._name = '']) {
+ _GroupContext([this.parent, this._name = '']) {
_testSetup = parentSetup;
_testTeardown = parentTeardown;
}
@@ -282,8 +282,8 @@ class GroupContext {
// We use a 'dummy' context for the top level to eliminate null
// checks when querying the context. This allows us to easily
// support top-level setUp/tearDown functions as well.
-GroupContext _rootContext = new GroupContext();
-GroupContext _currentContext = _rootContext;
+final _rootContext = new _GroupContext();
+_GroupContext _currentContext = _rootContext;
int _currentTestCaseIndex = 0;
@@ -583,7 +583,7 @@ Function protectAsync2(Function callback, {String id}) {
*/
void group(String description, void body()) {
ensureInitialized();
- _currentContext = new GroupContext(_currentContext, description);
+ _currentContext = new _GroupContext(_currentContext, description);
try {
body();
} catch (e, trace) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698