Last change
on this file since 10705 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
|
Rev | Line | |
---|
[9601] | 1 | #include <gtest/gtest.h> |
---|
| 2 | #include "core/class/OrxonoxInterface.h" |
---|
| 3 | #include "core/class/OrxonoxClass.h" |
---|
[10624] | 4 | #include "core/class/IdentifierManager.h" |
---|
[9649] | 5 | #include "core/object/Context.h" |
---|
[9601] | 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 | }; |
---|
[9649] | 28 | |
---|
| 29 | // Fixture |
---|
| 30 | class OrxonoxInterfaceTest : public ::testing::Test |
---|
| 31 | { |
---|
| 32 | public: |
---|
| 33 | virtual void SetUp() |
---|
| 34 | { |
---|
[10624] | 35 | new IdentifierManager(); |
---|
[9649] | 36 | Context::setRootContext(new Context(NULL)); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | virtual void TearDown() |
---|
| 40 | { |
---|
[10624] | 41 | Context::destroyRootContext(); |
---|
| 42 | delete &IdentifierManager::getInstance(); |
---|
[9649] | 43 | } |
---|
| 44 | }; |
---|
[9601] | 45 | } |
---|
| 46 | |
---|
[9649] | 47 | TEST_F(OrxonoxInterfaceTest, CanCreate1) |
---|
[9601] | 48 | { |
---|
| 49 | TestClass1* test = new TestClass1(); |
---|
| 50 | ASSERT_TRUE(test != NULL); |
---|
| 51 | delete test; |
---|
| 52 | } |
---|
| 53 | |
---|
[9649] | 54 | TEST_F(OrxonoxInterfaceTest, CanCreate2) |
---|
[9601] | 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.