Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core6/test/core/class/IdentifiableTest.cc @ 9605

Last change on this file since 9605 was 9601, checked in by landauf, 12 years ago

added some tests for core

  • Property svn:eol-style set to native
File size: 758 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() { RegisterRootObject(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.