Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/test/core/class/IdentifiableTest.cc @ 10041

Last change on this file since 10041 was 9659, checked in by landauf, 11 years ago

removed RegisterRootObject (replaced by RegisterObject)

  • Property svn:eol-style set to native
File size: 754 bytes
Line 
1#include <gtest/gtest.h>
2#include "core/CoreIncludes.h"
3#include "core/class/Identifiable.h"
4
5namespace orxonox
6{
7    namespace
8    {
9        class IdentifiableTest : public Identifiable
10        {
11            public:
12                IdentifiableTest() { RegisterObject(IdentifiableTest); }
13        };
14    }
15
16    TEST(IdentifiableTest, CanCreate)
17    {
18        IdentifiableTest* test = new IdentifiableTest();
19        ASSERT_TRUE(test != NULL);
20        delete test;
21    }
22
23    TEST(IdentifiableTest, HasIdentifierAssigned)
24    {
25        IdentifiableTest test;
26        EXPECT_TRUE(test.getIdentifier());
27    }
28
29    TEST(IdentifiableTest, CanBeIdentified)
30    {
31        IdentifiableTest test;
32        EXPECT_TRUE(test.isA(Class(IdentifiableTest)));
33    }
34}
Note: See TracBrowser for help on using the repository browser.