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

Unified Diff: runtime/vm/unit_test.cc

Issue 2666133002: Added new type of unit test, RAW_UNIT_TEST_CASE, which is used for tests that can be flaky if run w… (Closed)
Patch Set: Fixed name of UNIT_TEST_CASE macro Created 3 years, 11 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 | « runtime/vm/unit_test.h ('k') | runtime/vm/utils_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.cc
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index cec626875a33359826a483c1b2182e3ee0522720..6a9c5f511bf8c95b7fffc08ed7234fc80d3270cd 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -32,7 +32,8 @@ TestCaseBase* TestCaseBase::first_ = NULL;
TestCaseBase* TestCaseBase::tail_ = NULL;
-TestCaseBase::TestCaseBase(const char* name) : next_(NULL), name_(name) {
+TestCaseBase::TestCaseBase(const char* name)
+ : raw_test_(false), next_(NULL), name_(name) {
if (first_ == NULL) {
first_ = this;
} else {
@@ -42,10 +43,23 @@ TestCaseBase::TestCaseBase(const char* name) : next_(NULL), name_(name) {
}
+void TestCaseBase::RunAllRaw() {
+ TestCaseBase* test = first_;
+ while (test != NULL) {
+ if (test->raw_test_) {
+ test->RunTest();
+ }
+ test = test->next_;
+ }
+}
+
+
void TestCaseBase::RunAll() {
TestCaseBase* test = first_;
while (test != NULL) {
- test->RunTest();
+ if (!test->raw_test_) {
+ test->RunTest();
+ }
test = test->next_;
}
}
« no previous file with comments | « runtime/vm/unit_test.h ('k') | runtime/vm/utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698