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

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

Issue 12635: * Fixed exclusion of IA32-specific tests on ARM architecture. (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
53
54 class CcTest { 45 class CcTest {
55 public: 46 public:
56 typedef void (TestFunction)(); 47 typedef void (TestFunction)();
57 CcTest(TestFunction* callback, const char* file, const char* name, 48 CcTest(TestFunction* callback, const char* file, const char* name,
58 bool enabled); 49 bool enabled);
59 void Run() { callback_(); } 50 void Run() { callback_(); }
60 static int test_count(); 51 static int test_count();
61 static CcTest* last() { return last_; } 52 static CcTest* last() { return last_; }
62 CcTest* prev() { return prev_; } 53 CcTest* prev() { return prev_; }
63 const char* file() { return file_; } 54 const char* file() { return file_; }
64 const char* name() { return name_; } 55 const char* name() { return name_; }
65 bool enabled() { return enabled_; } 56 bool enabled() { return enabled_; }
66 private: 57 private:
67 TestFunction* callback_; 58 TestFunction* callback_;
68 const char* file_; 59 const char* file_;
69 const char* name_; 60 const char* name_;
70 bool enabled_; 61 bool enabled_;
71 static CcTest* last_; 62 static CcTest* last_;
72 CcTest* prev_; 63 CcTest* prev_;
73 }; 64 };
74 65
75 #endif // ifndef CCTEST_H_ 66 #endif // ifndef CCTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698