|
Last change
on this file since 9634 was
9601,
checked in by landauf, 13 years ago
|
|
added some tests for core
|
-
Property svn:eol-style set to
native
|
|
File size:
937 bytes
|
| Line | |
|---|
| 1 | #include <gtest/gtest.h> |
|---|
| 2 | #include "core/class/OrxonoxInterface.h" |
|---|
| 3 | #include "core/class/OrxonoxClass.h" |
|---|
| 4 | |
|---|
| 5 | namespace orxonox |
|---|
| 6 | { |
|---|
| 7 | namespace |
|---|
| 8 | { |
|---|
| 9 | class Interface1 : virtual public OrxonoxInterface |
|---|
| 10 | { |
|---|
| 11 | }; |
|---|
| 12 | class Interface2 : virtual public OrxonoxInterface |
|---|
| 13 | { |
|---|
| 14 | }; |
|---|
| 15 | class Interface3 : virtual public OrxonoxInterface |
|---|
| 16 | { |
|---|
| 17 | }; |
|---|
| 18 | |
|---|
| 19 | class TestClass1 : public Interface1, public Interface2, public Interface3 |
|---|
| 20 | { |
|---|
| 21 | }; |
|---|
| 22 | |
|---|
| 23 | class TestClass2 : public OrxonoxClass, public Interface1, public Interface2, public Interface3 |
|---|
| 24 | { |
|---|
| 25 | }; |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | TEST(OrxonoxInterfaceTest, CanCreate1) |
|---|
| 29 | { |
|---|
| 30 | TestClass1* test = new TestClass1(); |
|---|
| 31 | ASSERT_TRUE(test != NULL); |
|---|
| 32 | delete test; |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | TEST(OrxonoxInterfaceTest, CanCreate2) |
|---|
| 36 | { |
|---|
| 37 | TestClass2* test = new TestClass2(); |
|---|
| 38 | ASSERT_TRUE(test != NULL); |
|---|
| 39 | delete test; |
|---|
| 40 | } |
|---|
| 41 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.