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

Unified Diff: ppapi/tests/test_case.h

Issue 7648033: Add means for running some tests only o-o-p, add messaging o-o-p test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated a copyright header Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/tests/pp_thread.h ('k') | ppapi/tests/test_post_message.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_case.h
diff --git a/ppapi/tests/test_case.h b/ppapi/tests/test_case.h
index 0a3cdc65a6e72c2c220cbc2340a37899f5d091ec..06ebcb1ccd1529511bded3900b8d0a536da66543 100644
--- a/ppapi/tests/test_case.h
+++ b/ppapi/tests/test_case.h
@@ -130,18 +130,24 @@ class TestCaseFactory {
// RunTest function. This assumes the function name is TestFoo where Foo is the
// test |name|.
#define RUN_TEST(name) \
- force_async_ = false; \
- instance_->LogTest(#name, Test##name());
+ do { \
+ force_async_ = false; \
+ instance_->LogTest(#name, Test##name()); \
+ } while (false)
// Like RUN_TEST above but forces functions taking callbacks to complete
// asynchronously on success or error.
#define RUN_TEST_FORCEASYNC(name) \
- force_async_ = true; \
- instance_->LogTest(#name"ForceAsync", Test##name());
+ do { \
+ force_async_ = true; \
+ instance_->LogTest(#name"ForceAsync", Test##name()); \
+ } while (false)
#define RUN_TEST_FORCEASYNC_AND_NOT(name) \
- RUN_TEST_FORCEASYNC(name); \
- RUN_TEST(name);
+ do { \
+ RUN_TEST_FORCEASYNC(name); \
+ RUN_TEST(name); \
+ } while (false)
// Helper macros for checking values in tests, and returning a location
« no previous file with comments | « ppapi/tests/pp_thread.h ('k') | ppapi/tests/test_post_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698