Last change
on this file since 10872 was
10624,
checked in by landauf, 9 years ago
|
merged branch core7 back to trunk
|
-
Property svn:eol-style set to
native
|
File size:
1.5 KB
|
Line | |
---|
1 | #include <gtest/gtest.h> |
---|
2 | #include "core/class/OrxonoxInterface.h" |
---|
3 | #include "core/class/OrxonoxClass.h" |
---|
4 | #include "core/class/IdentifierManager.h" |
---|
5 | #include "core/object/Context.h" |
---|
6 | |
---|
7 | namespace orxonox |
---|
8 | { |
---|
9 | namespace |
---|
10 | { |
---|
11 | class Interface1 : virtual public OrxonoxInterface |
---|
12 | { |
---|
13 | }; |
---|
14 | class Interface2 : virtual public OrxonoxInterface |
---|
15 | { |
---|
16 | }; |
---|
17 | class Interface3 : virtual public OrxonoxInterface |
---|
18 | { |
---|
19 | }; |
---|
20 | |
---|
21 | class TestClass1 : public Interface1, public Interface2, public Interface3 |
---|
22 | { |
---|
23 | }; |
---|
24 | |
---|
25 | class TestClass2 : public OrxonoxClass, public Interface1, public Interface2, public Interface3 |
---|
26 | { |
---|
27 | }; |
---|
28 | |
---|
29 | // Fixture |
---|
30 | class OrxonoxInterfaceTest : public ::testing::Test |
---|
31 | { |
---|
32 | public: |
---|
33 | virtual void SetUp() |
---|
34 | { |
---|
35 | new IdentifierManager(); |
---|
36 | Context::setRootContext(new Context(NULL)); |
---|
37 | } |
---|
38 | |
---|
39 | virtual void TearDown() |
---|
40 | { |
---|
41 | Context::destroyRootContext(); |
---|
42 | delete &IdentifierManager::getInstance(); |
---|
43 | } |
---|
44 | }; |
---|
45 | } |
---|
46 | |
---|
47 | TEST_F(OrxonoxInterfaceTest, CanCreate1) |
---|
48 | { |
---|
49 | TestClass1* test = new TestClass1(); |
---|
50 | ASSERT_TRUE(test != NULL); |
---|
51 | delete test; |
---|
52 | } |
---|
53 | |
---|
54 | TEST_F(OrxonoxInterfaceTest, CanCreate2) |
---|
55 | { |
---|
56 | TestClass2* test = new TestClass2(); |
---|
57 | ASSERT_TRUE(test != NULL); |
---|
58 | delete test; |
---|
59 | } |
---|
60 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.