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

Side by Side Diff: pkg/status_file/lib/expectation.dart

Issue 2988383002: A minimal status file formatter and canonicalizer. (Closed)
Patch Set: Created 3 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// The possible outcomes from running a test. 5 /// The possible outcomes from running a test.
6 class Expectation { 6 class Expectation {
7 /// The test completed normally and did what it intended to do. 7 /// The test completed normally and did what it intended to do.
8 static final Expectation pass = new Expectation._('Pass'); 8 static final Expectation pass = new Expectation._('Pass');
9 9
10 /// The process aborted in a way that is not a potential runtime error coming 10 /// The process aborted in a way that is not a potential runtime error coming
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 /// expectations are intentional and not a result of bugs or features that 99 /// expectations are intentional and not a result of bugs or features that
100 /// have yet to be implemented. 100 /// have yet to be implemented.
101 /// 101 ///
102 /// For example, a test marked "RuntimeError, Ok" means "This test is 102 /// For example, a test marked "RuntimeError, Ok" means "This test is
103 /// *supposed* to fail at runtime." 103 /// *supposed* to fail at runtime."
104 // TODO(rnystrom): This is redundant with other mechanisms like 104 // TODO(rnystrom): This is redundant with other mechanisms like
105 // `@runtime-error` and the markers in analyzer tests for stating where a 105 // `@runtime-error` and the markers in analyzer tests for stating where a
106 // static error should be reported. It leads to perpetually larger status 106 // static error should be reported. It leads to perpetually larger status
107 // files and means a reader of a test can't tell what the intended behavior 107 // files and means a reader of a test can't tell what the intended behavior
108 // actually is without knowing which status files mention it. Remove. 108 // actually is without knowing which status files mention it. Remove.
109 static final Expectation ok = new Expectation._('Ok', isMeta: true); 109 static final Expectation ok = new Expectation._('OK', isMeta: true);
110 110
111 /// A marker that indicates the test takes longer to complete than most tests. 111 /// A marker that indicates the test takes longer to complete than most tests.
112 /// Tells the test runner to increase the timeout when running it. 112 /// Tells the test runner to increase the timeout when running it.
113 static final Expectation slow = new Expectation._('Slow', isMeta: true); 113 static final Expectation slow = new Expectation._('Slow', isMeta: true);
114 114
115 /// Tells the test runner to not attempt to run the test. 115 /// Tells the test runner to not attempt to run the test.
116 /// 116 ///
117 /// This means the test runner does not compare the test's actual results with 117 /// This means the test runner does not compare the test's actual results with
118 /// the expected results at all. This expectation should be avoided since it's 118 /// the expected results at all. This expectation should be avoided since it's
119 /// doesn't indicate *why* the test is being skipped and means we won't 119 /// doesn't indicate *why* the test is being skipped and means we won't
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return true; 202 return true;
203 } 203 }
204 outcome = outcome._group; 204 outcome = outcome._group;
205 } 205 }
206 206
207 return false; 207 return false;
208 } 208 }
209 209
210 String toString() => _name; 210 String toString() => _name;
211 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698