#include #define protected public #include #include #include #include #include #include #include "ScriptTest.h" using namespace std; using namespace crepe; using namespace testing; class ScriptECSTest : public ScriptTest { public: class TestComponent : public Component { using Component::Component; }; }; TEST_F(ScriptECSTest, GetOwnComponent) { MyScript & script = this->script; Metadata & metadata = script.get_component(); EXPECT_EQ(metadata.name, OBJ_NAME); } TEST_F(ScriptECSTest, GetOwnComponents) { const unsigned COUNT = 4; for (unsigned i = 0; i < COUNT; i++) entity.add_component(); MyScript & script = this->script; RefVector components = script.get_components(); EXPECT_EQ(components.size(), COUNT); }