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

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

Issue 11608: * Added tests for regexp-macro-assembler-ia32. (Closed)
Patch Set: Created 12 years 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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. 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 24 matching lines...) Expand all
35 static void Test##Name() 35 static void Test##Name()
36 #endif 36 #endif
37 37
38 #ifndef DISABLED_TEST 38 #ifndef DISABLED_TEST
39 #define DISABLED_TEST(Name) \ 39 #define DISABLED_TEST(Name) \
40 static void Test##Name(); \ 40 static void Test##Name(); \
41 CcTest register_test_##Name(Test##Name, __FILE__, #Name, false); \ 41 CcTest register_test_##Name(Test##Name, __FILE__, #Name, false); \
42 static void Test##Name() 42 static void Test##Name()
43 #endif 43 #endif
44 44
45 #if (defined __arm__ || defined __thumb__ || defined ARM)
46 #define IA32TEST DISABLED_TEST
47 #define ARMTEST TEST
48 #else // ia32
49 #define IA32TEST TEST
50 #define ARMTEST DISABLED_TEST
51 #endif
52
45 53
46 class CcTest { 54 class CcTest {
47 public: 55 public:
48 typedef void (TestFunction)(); 56 typedef void (TestFunction)();
49 CcTest(TestFunction* callback, const char* file, const char* name, 57 CcTest(TestFunction* callback, const char* file, const char* name,
50 bool enabled); 58 bool enabled);
51 void Run() { callback_(); } 59 void Run() { callback_(); }
52 static int test_count(); 60 static int test_count();
53 static CcTest* last() { return last_; } 61 static CcTest* last() { return last_; }
54 CcTest* prev() { return prev_; } 62 CcTest* prev() { return prev_; }
55 const char* file() { return file_; } 63 const char* file() { return file_; }
56 const char* name() { return name_; } 64 const char* name() { return name_; }
57 bool enabled() { return enabled_; } 65 bool enabled() { return enabled_; }
58 private: 66 private:
59 TestFunction* callback_; 67 TestFunction* callback_;
60 const char* file_; 68 const char* file_;
61 const char* name_; 69 const char* name_;
62 bool enabled_; 70 bool enabled_;
63 static CcTest* last_; 71 static CcTest* last_;
64 CcTest* prev_; 72 CcTest* prev_;
65 }; 73 };
66 74
67 #endif // ifndef CCTEST_H_ 75 #endif // ifndef CCTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698