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

Unified Diff: test/cctest/test-api.cc

Issue 2470143004: [test] Speed up some slow tests. (Closed)
Patch Set: address comment Created 4 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:
Download patch
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index ee202c2e997216fcf68d285b3450bbfbc4ac60f7..47711636ff9d3020b45bf5593c8425aa5ca38a23 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -13820,34 +13820,23 @@ void ApiTestFuzzer::CallTest() {
test_number_);
}
-// Lets not be needlessly self-referential.
-TEST(Threading1) {
- ApiTestFuzzer::SetUp(ApiTestFuzzer::FIRST_PART);
- ApiTestFuzzer::RunAllTests();
- ApiTestFuzzer::TearDown();
-}
-
-
-TEST(Threading2) {
- ApiTestFuzzer::SetUp(ApiTestFuzzer::SECOND_PART);
- ApiTestFuzzer::RunAllTests();
- ApiTestFuzzer::TearDown();
-}
-
-
-TEST(Threading3) {
- ApiTestFuzzer::SetUp(ApiTestFuzzer::THIRD_PART);
- ApiTestFuzzer::RunAllTests();
- ApiTestFuzzer::TearDown();
-}
-
-
-TEST(Threading4) {
- ApiTestFuzzer::SetUp(ApiTestFuzzer::FOURTH_PART);
- ApiTestFuzzer::RunAllTests();
- ApiTestFuzzer::TearDown();
-}
-
+#define THREADING_TEST(INDEX, NAME) \
+ TEST(Threading##INDEX) { \
+ ApiTestFuzzer::SetUp(ApiTestFuzzer::NAME); \
+ ApiTestFuzzer::RunAllTests(); \
+ ApiTestFuzzer::TearDown(); \
+ }
+
+THREADING_TEST(1, FIRST_PART)
+THREADING_TEST(2, SECOND_PART)
+THREADING_TEST(3, THIRD_PART)
+THREADING_TEST(4, FOURTH_PART)
+THREADING_TEST(5, FIFTH_PART)
+THREADING_TEST(6, SIXTH_PART)
+THREADING_TEST(7, SEVENTH_PART)
+THREADING_TEST(8, EIGHTH_PART)
+
+#undef THREADING_TEST
static void ThrowInJS(const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::Isolate* isolate = args.GetIsolate();
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698