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

Side by Side Diff: test/cctest/cctest.h

Issue 456: Disable three debug tests that failed because they rely on wrong for-in order... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/cctest.cc » ('j') | test/cctest/cctest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 Google Inc. All Rights Reserved. 1 // Copyright 2008 Google Inc. All Rights Reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 13 matching lines...) Expand all
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef CCTEST_H_ 28 #ifndef CCTEST_H_
29 #define CCTEST_H_ 29 #define CCTEST_H_
30 30
31 #ifndef TEST 31 #ifndef TEST
32 #define TEST(Name) \ 32 #define TEST(Name) \
33 static void Test##Name(); \ 33 static void Test##Name(); \
34 CcTest register_test_##Name(Test##Name, __FILE__, #Name); \ 34 CcTest register_test_##Name(Test##Name, __FILE__, #Name, true); \
35 static void Test##Name()
36 #endif
37
38 #ifndef DISABLED_TEST
39 #define DISABLED_TEST(Name) \
40 static void Test##Name(); \
41 CcTest register_test_##Name(Test##Name, __FILE__, #Name, false); \
35 static void Test##Name() 42 static void Test##Name()
36 #endif 43 #endif
37 44
38 45
39 class CcTest { 46 class CcTest {
40 public: 47 public:
41 typedef void (TestFunction)(); 48 typedef void (TestFunction)();
42 CcTest(TestFunction* callback, const char* file, const char* name); 49 CcTest(TestFunction* callback, const char* file, const char* name,
50 bool enabled);
43 void Run() { callback_(); } 51 void Run() { callback_(); }
44 static int test_count(); 52 static int test_count();
45 static CcTest* last() { return last_; } 53 static CcTest* last() { return last_; }
46 CcTest* prev() { return prev_; } 54 CcTest* prev() { return prev_; }
47 const char* file() { return file_; } 55 const char* file() { return file_; }
48 const char* name() { return name_; } 56 const char* name() { return name_; }
57 bool enabled() { return enabled_; }
49 private: 58 private:
50 TestFunction* callback_; 59 TestFunction* callback_;
51 const char* file_; 60 const char* file_;
52 const char* name_; 61 const char* name_;
62 bool enabled_;
53 static CcTest* last_; 63 static CcTest* last_;
54 CcTest* prev_; 64 CcTest* prev_;
55 }; 65 };
56 66
57 #endif // ifndef CCTEST_H_ 67 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.cc » ('j') | test/cctest/cctest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698