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

Side by Side Diff: src/shared/test_case.h

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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
« no previous file with comments | « src/shared/shared.gyp ('k') | src/shared/test_case.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #ifndef SRC_SHARED_TEST_CASE_H_ 5 #ifndef SRC_SHARED_TEST_CASE_H_
6 #define SRC_SHARED_TEST_CASE_H_ 6 #define SRC_SHARED_TEST_CASE_H_
7 7
8 #include "src/shared/globals.h" 8 #include "src/shared/globals.h"
9 9
10 #define TEST_CASE(name) \ 10 #define TEST_CASE(name) \
11 static void Test##name(); \ 11 static void Test##name(); \
12 static const fletch::TestCase kRegister##name(Test##name, #name); \ 12 static const dartino::TestCase kRegister##name(Test##name, #name); \
13 static void Test##name() 13 static void Test##name()
14 14
15 #define TEST_EXPORT(method) \ 15 #define TEST_EXPORT(method) \
16 extern "C" { \ 16 extern "C" { \
17 __attribute__((visibility("default"))) method \ 17 __attribute__((visibility("default"))) method \
18 } 18 }
19 19
20 namespace fletch { 20 namespace dartino {
21 21
22 class TestCase { 22 class TestCase {
23 public: 23 public:
24 typedef void(RunEntry)(); 24 typedef void(RunEntry)();
25 25
26 TestCase(RunEntry* run, const char* name); 26 TestCase(RunEntry* run, const char* name);
27 virtual ~TestCase() {} 27 virtual ~TestCase() {}
28 28
29 const char* name() const { return name_; } 29 const char* name() const { return name_; }
30 30
31 virtual void Run(); 31 virtual void Run();
32 static void RunAll(); 32 static void RunAll();
33 33
34 private: 34 private:
35 static TestCase* first_; 35 static TestCase* first_;
36 static TestCase* current_; 36 static TestCase* current_;
37 37
38 TestCase* next_; 38 TestCase* next_;
39 RunEntry* const run_; 39 RunEntry* const run_;
40 const char* name_; 40 const char* name_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(TestCase); 42 DISALLOW_COPY_AND_ASSIGN(TestCase);
43 }; 43 };
44 44
45 } // namespace fletch 45 } // namespace dartino
46 46
47 #endif // SRC_SHARED_TEST_CASE_H_ 47 #endif // SRC_SHARED_TEST_CASE_H_
OLDNEW
« no previous file with comments | « src/shared/shared.gyp ('k') | src/shared/test_case.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698