Ejemplo n.º 1
0
LOAD_TEST(btunittest, selector_probability_ut_2)
{
	const char* tree = "node_test/selector_probability_ut_2";

	behaviac::Profiler::CreateInstance();
	behaviac::Config::SetSocketing(false);
	behaviac::Config::SetLogging(false);

	//behaviac::Agent::Register<AgentNodeTest>();
	registerAllTypes();
	AgentNodeTest* myTestAgent = AgentNodeTest::DynamicCast(behaviac::Agent::Create<AgentNodeTest>());
	behaviac::Agent::SetIdMask(1);
	myTestAgent->SetIdFlag(1);
	myTestAgent->btload(tree);
	myTestAgent->btsetcurrent(tree);
	myTestAgent->resetProperties();

	int loopCount = 10000;

	while (loopCount > 0)
	{
		myTestAgent->btexec();
		CHECK_EQUAL(-1, myTestAgent->testVar_0);
		--loopCount;
	}

	unregisterAllTypes();
	BEHAVIAC_DELETE(myTestAgent);
	//behaviac::Agent::UnRegister<AgentNodeTest>();

	behaviac::Profiler::DestroyInstance();
}
Ejemplo n.º 2
0
LOAD_TEST(btunittest, event_ut_2)
{
	registerAllTypes();

	ChildNodeTest* childTestAgent = ChildNodeTest::DynamicCast(behaviac::Agent::Create<ChildNodeTest>(100, "ChildNodeTest", 0, 0));
	CHECK_EQUAL(100, childTestAgent->testVar_0);

	childTestAgent->resetProperties();

	const char* treePath = "node_test/event_ut_2";
	childTestAgent->btload(treePath);
    childTestAgent->btsetcurrent(treePath);

	childTestAgent->btexec();

	behaviac::EBTStatus status = childTestAgent->btexec();
	CHECK_EQUAL(behaviac::BT_RUNNING, status);

	childTestAgent->FireEvent("event_test_int_bool", 15, true);
	CHECK_EQUAL(true, childTestAgent->event_test_var_bool);
	CHECK_EQUAL(15, childTestAgent->event_test_var_int);

	status = childTestAgent->btexec();
	CHECK_EQUAL(behaviac::BT_SUCCESS, status);

	BEHAVIAC_DELETE(childTestAgent);

	unregisterAllTypes();
}
Ejemplo n.º 3
0
TEST(btunittest, agentInvoke)
{
    EmployeeParTestAgent::clearAllStaticMemberVariables();

    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    registerAllTypes();

    behaviac::Agent* testAgent = behaviac::Agent::Create<AgentNodeTest>();
    AgentNodeTest* nodeTestAgent = AgentNodeTest::DynamicCast(testAgent);

    CHECK_EQUAL(true, behaviac::Agent::Invoke(testAgent, "AgentNodeTest::setTestVar_0", 999));
    CHECK_EQUAL(999, nodeTestAgent->testVar_0);

    CHECK_EQUAL(true, behaviac::Agent::Invoke(testAgent, "AgentNodeTest::setTestVar_0_2", 8999, 1000.99f));
    CHECK_EQUAL(8999, nodeTestAgent->testVar_0);
    CHECK_FLOAT_EQUAL(1000.99f, nodeTestAgent->testVar_2);

    //float returnValue = 0.0f;
    //CHECK_EQUAL(true, behaviac::Agent::Invoke(testAgent, "AgentNodeTest::setTestVar_R"));
    //behaviac::Agent::GetInvokeReturn(testAgent, "AgentNodeTest::setTestVar_R", returnValue);
    //CHECK_EQUAL(9999.99f, returnValue);

    behaviac::Agent::Destroy(testAgent);

    unregisterAllTypes();

    behaviac::Profiler::DestroyInstance();
}
Ejemplo n.º 4
0
TEST(btunittest, context)
{
    EmployeeParTestAgent::clearAllStaticMemberVariables();

    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    registerAllTypes();
    behaviac::Agent::RegisterInstanceName<ParTestAgent>("ParTestAgent");

    ParTestAgent* testAgent_0 = behaviac::Agent::Create<ParTestAgent>(0, 1);
    ParTestAgent* testAgent_1 = behaviac::Agent::Create<ParTestAgent>(0, 2);
    ParTestAgent* testAgent_2 = behaviac::Agent::Create<ParTestAgent>(0, 3);

    CHECK_NOT_EQUAL(testAgent_0, testAgent_1);
    CHECK_NOT_EQUAL(testAgent_1, testAgent_2);
    CHECK_NOT_EQUAL(testAgent_2, testAgent_0);

    testAgent_0->resetProperties();
    testAgent_1->resetProperties();
    testAgent_2->resetProperties();

    testAgent_0->TV_BOOL_0 = true;
    CHECK_EQUAL(true, testAgent_0->TV_BOOL_0);
    CHECK_EQUAL(false, testAgent_1->TV_BOOL_0);
    CHECK_EQUAL(false, testAgent_2->TV_BOOL_0);

    testAgent_1->TV_BOOL_0 = true;
    CHECK_EQUAL(true, testAgent_0->TV_BOOL_0);
    CHECK_EQUAL(true, testAgent_1->TV_BOOL_0);
    CHECK_EQUAL(false, testAgent_2->TV_BOOL_0);

    testAgent_2->TV_BOOL_0 = true;
    CHECK_EQUAL(true, testAgent_0->TV_BOOL_0);
    CHECK_EQUAL(true, testAgent_1->TV_BOOL_0);
    CHECK_EQUAL(true, testAgent_1->TV_BOOL_0);

    behaviac::Agent::Destroy(testAgent_0);
    behaviac::Agent::Destroy(testAgent_1);
    behaviac::Agent::Destroy(testAgent_2);

    behaviac::Context::Cleanup(1);
    behaviac::Context::Cleanup(2);
    behaviac::Context::Cleanup(3);

    behaviac::Agent::UnRegisterInstanceName<ParTestAgent>("ParTestAgent");
    unregisterAllTypes();

    behaviac::Profiler::DestroyInstance();
}
Ejemplo n.º 5
0
TestNS::AgentArrayAccessTest* initTestEnvArray(const char* treePath, behaviac::Workspace::EFileFormat format)
{
    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    registerAllTypes();
    TestNS::AgentArrayAccessTest* testAgent = TestNS::AgentArrayAccessTest::DynamicCast(behaviac::Agent::Create<TestNS::AgentArrayAccessTest>());
    behaviac::Agent::SetIdMask(1);
    testAgent->SetIdFlag(1);
    testAgent->btload(treePath);
    testAgent->btsetcurrent(treePath);
    return testAgent;
}
Ejemplo n.º 6
0
static HTNAgentTravel* initTestEnvHTNTravel(const char* treePath, behaviac::Workspace::EFileFormat format)
{
	behaviac::Profiler::CreateInstance();
	behaviac::Config::SetSocketing(false);
	//behaviac::Config::SetLogging(false);

	registerAllTypes();
	HTNAgentTravel* testAgent = HTNAgentTravel::DynamicCast(behaviac::Agent::Create<HTNAgentTravel>());
	behaviac::Agent::SetIdMask(1);
	testAgent->SetIdFlag(1);

	testAgent->btload(treePath);
	testAgent->btsetcurrent(treePath);
	return testAgent;
}
Ejemplo n.º 7
0
LOAD_TEST(btunittest, selector_probability_ut_4)
{
	const char* tree = "node_test/selector_probability_ut_4";

	behaviac::Profiler::CreateInstance();
	behaviac::Config::SetSocketing(false);
	behaviac::Config::SetLogging(false);

	//behaviac::Agent::Register<AgentNodeTest>();
	registerAllTypes();
	AgentNodeTest* myTestAgent = AgentNodeTest::DynamicCast(behaviac::Agent::Create<AgentNodeTest>());
	behaviac::Agent::SetIdMask(1);
	myTestAgent->SetIdFlag(1);
	myTestAgent->btload(tree);
	myTestAgent->btsetcurrent(tree);
	myTestAgent->resetProperties();

	behaviac::Workspace::GetInstance()->SetTimeSinceStartup(0.0);

	for (int i = 0; i < 10; ++i) {
		myTestAgent->btexec();
		if (myTestAgent->testVar_0 != -1) {
			CHECK_EQUAL(0, myTestAgent->testVar_0);
			CHECK_EQUAL(-1, myTestAgent->testVar_1);
			CHECK_FLOAT_EQUAL(0.0f, myTestAgent->testVar_2);
		}
		else {
			CHECK_EQUAL(-1, myTestAgent->testVar_0);
			CHECK_EQUAL(0, myTestAgent->testVar_1);
			CHECK_FLOAT_EQUAL(-1, myTestAgent->testVar_2);
		}

		behaviac::Workspace::GetInstance()->SetTimeSinceStartup(behaviac::Workspace::GetInstance()->GetTimeSinceStartup() + 0.1);
	}

	behaviac::Workspace::GetInstance()->SetTimeSinceStartup(behaviac::Workspace::GetInstance()->GetTimeSinceStartup() + 0.1);
	myTestAgent->btexec();

	CHECK_EQUAL(-1, myTestAgent->testVar_0);
	CHECK_EQUAL(-1, myTestAgent->testVar_1);


	unregisterAllTypes();
	BEHAVIAC_DELETE(myTestAgent);
	//behaviac::Agent::UnRegister<AgentNodeTest>();

	behaviac::Profiler::DestroyInstance();
}
Ejemplo n.º 8
0
//< Wait For Frames Tests
LOAD_TEST(btunittest, action_waitframes_ut_0)
{
    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    //behaviac::Agent::Register<AgentNodeTest>();
    registerAllTypes();
    AgentNodeTest* myTestAgent = AgentNodeTest::DynamicCast(behaviac::Agent::Create<AgentNodeTest>());
    behaviac::Agent::SetIdMask(1);
    myTestAgent->SetIdFlag(1);
    myTestAgent->btload("node_test/action_waitframes_ut_0");
    myTestAgent->btsetcurrent("node_test/action_waitframes_ut_0");
    myTestAgent->resetProperties();

    int loopCount = 0;

	behaviac::Workspace::GetInstance()->SetFrameSinceStartup(0);

    while (loopCount < 5)
    {
        myTestAgent->btexec();

        if (loopCount < 4)
        {
            CHECK_EQUAL(1, myTestAgent->testVar_0);
        }
        else
        {
            CHECK_EQUAL(2, myTestAgent->testVar_0);
        }

        ++loopCount;
		behaviac::Workspace::GetInstance()->SetFrameSinceStartup(behaviac::Workspace::GetInstance()->GetFrameSinceStartup() + 1);
    }

    myTestAgent->resetProperties();
    myTestAgent->btexec();
    CHECK_EQUAL(1, myTestAgent->testVar_0);

    BEHAVIAC_DELETE(myTestAgent);
    behaviac::Agent::UnRegister<AgentNodeTest>();

    behaviac::Profiler::DestroyInstance();

    unregisterAllTypes();
}
Ejemplo n.º 9
0
void test_stochastic_distribution_0(behaviac::string tree, behaviac::Workspace::EFileFormat format)
{
    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    //behaviac::Agent::Register<AgentNodeTest>();
    registerAllTypes();

    AgentNodeTest* myTestAgent = AgentNodeTest::DynamicCast(behaviac::Agent::Create<AgentNodeTest>());
    behaviac::Agent::SetIdMask(1);
    myTestAgent->SetIdFlag(1);
    //ms_workspace = new BehaviacWorkspace();
    myTestAgent->btload(tree.c_str());
    myTestAgent->btsetcurrent(tree.c_str());
    myTestAgent->resetProperties();

    int counts[3] = { 0, 0, 0 };
    int loopCount = STOCHASTIC_SAMPLE_COUNT;

    while (loopCount > 0)
    {
        myTestAgent->btexec();
        ++(counts[myTestAgent->testVar_0]);
        --loopCount;
    }

#if BEHAVIAC_COMPILER_MSVC

    for (int i = 0; i < 3; ++i)
    {
        int k = counts[i];
        int bias = abs(k - STOCHASTIC_SAMPLE_COUNT / 3);
        CHECK_LESS(bias, (STOCHASTIC_SAMPLE_COUNT / 20));
    }

#endif
    unregisterAllTypes();
    BEHAVIAC_DELETE(myTestAgent);
    //behaviac::Agent::UnRegister<AgentNodeTest>();

    behaviac::Profiler::DestroyInstance();
}
Ejemplo n.º 10
0
void test_stochastic_distribution_1(behaviac::string tree, behaviac::Workspace::EFileFormat format,
                                    int loopCount = STOCHASTIC_SAMPLE_COUNT, int referenceValue = STOCHASTIC_SAMPLE_COUNT / 3, int checkValue = STOCHASTIC_SAMPLE_COUNT / 30)
{
    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    //behaviac::Agent::Register<AgentNodeTest>();
    registerAllTypes();
    AgentNodeTest* myTestAgent = AgentNodeTest::DynamicCast(behaviac::Agent::Create<AgentNodeTest>());
    behaviac::Agent::SetIdMask(1);
    myTestAgent->SetIdFlag(1);


    int predicateValueCount = 0;
    myTestAgent->btload(tree.c_str());
    myTestAgent->btsetcurrent(tree.c_str());
    myTestAgent->resetProperties();

    while (loopCount > 0)
    {
        myTestAgent->resetProperties();
        myTestAgent->btexec();

        if (myTestAgent->testVar_0 == 0)
        {
            predicateValueCount++;
        }

        --loopCount;
    }

#if BEHAVIAC_COMPILER_MSVC
    int bias = abs(predicateValueCount - referenceValue);
    CHECK_LESS(bias, checkValue);
#endif
    unregisterAllTypes();
    BEHAVIAC_DELETE(myTestAgent);
    //behaviac::Agent::UnRegister<AgentNodeTest>();

    behaviac::Profiler::DestroyInstance();
}
Ejemplo n.º 11
0
//< Selector Probability Tests
void test_stochastic_distribution_2(behaviac::string tree, behaviac::Workspace::EFileFormat format, int refs[3])
{
    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    //behaviac::Agent::Register<AgentNodeTest>();
    registerAllTypes();
    AgentNodeTest* myTestAgent = AgentNodeTest::DynamicCast(behaviac::Agent::Create<AgentNodeTest>());
    behaviac::Agent::SetIdMask(1);
    myTestAgent->SetIdFlag(1);
    myTestAgent->btload(tree.c_str());
    myTestAgent->btsetcurrent(tree.c_str());
    myTestAgent->resetProperties();

    int counts[3] = { 0, 0, 0 };
    int loopCount = 10000;

    while (loopCount > 0)
    {
        myTestAgent->btexec();
        ++(counts[myTestAgent->testVar_0]);
        --loopCount;
    }

    for (int i = 0; i < 3; ++i)
    {
        int k = counts[i];
        int bias = abs(k - refs[i]);
        CHECK_LESS(bias, 1000);
    }

    unregisterAllTypes();
    BEHAVIAC_DELETE(myTestAgent);
    //behaviac::Agent::UnRegister<AgentNodeTest>();

    behaviac::Profiler::DestroyInstance();
}
Ejemplo n.º 12
0
ScriptEngine::ScriptEngine()
	: m_engine(asCreateScriptEngine())
{
	if (!m_engine)
		return;

	// Set the message callback to receive information on errors in human readable form.
	int r = m_engine->SetMessageCallback(asFUNCTION(MessageCallback), &m_errorString, asCALL_CDECL); assert(r >= 0);

	RegisterStdString(m_engine);
	//	RegisterStdStringUtils(engine);

	// The scripts can directly print text
	r = m_engine->RegisterGlobalFunction("void print(const string &in message)", asMETHOD(ScriptEngine, print), asCALL_THISCALL_ASGLOBAL, this); assert(r >= 0);

	RegisterScriptMath(m_engine);
	aatc::RegisterAllContainers(m_engine);
	
	registerObject(m_engine);
	registerAllTypes(m_engine);
	
	generateReference();
}
Ejemplo n.º 13
0
void btunitest_game(behaviac::Workspace::EFileFormat format)
{
    EmployeeParTestAgent::clearAllStaticMemberVariables();

    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    registerAllTypes();
    EmployeeParTestAgent* myTestAgent = EmployeeParTestAgent::DynamicCast(behaviac::Agent::Create<EmployeeParTestAgent>());
    behaviac::Agent::SetIdMask(1);
    myTestAgent->SetIdFlag(1);

    //myTestAgent->btload("par_test/register_name_as_left_value_and_param");
    myTestAgent->btsetcurrent("par_test/register_name_as_left_value_and_param");

    ParTestRegNameAgent::clearAllStaticMemberVariables();

    behaviac::Agent::Create<ParTestRegNameAgent>("ParTestRegNameAgent");
    ParTestRegNameAgent* regNameAgent = behaviac::Agent::GetInstance<ParTestRegNameAgent>("ParTestRegNameAgent");
    regNameAgent->resetProperties();

    myTestAgent->resetProperties();
    myTestAgent->btexec();

    behaviac::Agent::Destroy(regNameAgent);
    behaviac::Agent::UnRegisterInstanceName<ParTestRegNameAgent>("ParTestRegNameAgent");

    BEHAVIAC_DELETE(myTestAgent);
    behaviac::Workspace::GetInstance()->UnLoadAll();

    unregisterAllTypes();

    behaviac::Profiler::DestroyInstance();

    BEHAVIAC_ASSERT(true);
}
Ejemplo n.º 14
0
LOAD_TEST(btunittest, save_meta_file)
{
    registerAllTypes();
    behaviac::Workspace::ExportMetas("../test/btunittest/BehaviacData/xmlmeta/UnitTestCppMeta.xml");
    unregisterAllTypes();
}
Ejemplo n.º 15
0
void memory_leak_test(behaviac::Workspace::EFileFormat format)
{
#if ENABLE_MEMORYDUMP
    _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
    _CrtDumpMemoryLeaks();

    static long s_breakalloc = -1;
    _CrtSetBreakAlloc(s_breakalloc);
#endif
    behaviac::IMemAllocator& allocator = behaviac::GetMemoryAllocator();
	size_t allocatedSize = allocator.GetAllocatedSize();

#if ENABLE_MEMORYDUMP
    _CrtMemState s1;
    _CrtMemCheckpoint(&s1);
#endif
    EmployeeParTestAgent::clearAllStaticMemberVariables();

    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    registerAllTypes();
    EmployeeParTestAgent* myTestAgent = EmployeeParTestAgent::DynamicCast(behaviac::Agent::Create<EmployeeParTestAgent>());
    behaviac::Agent::SetIdMask(1);
    myTestAgent->SetIdFlag(1);

    //myTestAgent->btload("par_test/register_name_as_left_value_and_param");
    myTestAgent->btsetcurrent("par_test/register_name_as_left_value_and_param");

    ParTestRegNameAgent::clearAllStaticMemberVariables();

    behaviac::Agent::Create<ParTestRegNameAgent>("ParTestRegNameAgent");
    ParTestRegNameAgent* regNameAgent = behaviac::Agent::GetInstance<ParTestRegNameAgent>("ParTestRegNameAgent");
    regNameAgent->resetProperties();

    myTestAgent->resetProperties();
    myTestAgent->btexec();

    behaviac::Agent::Destroy(regNameAgent);
    behaviac::Agent::UnRegisterInstanceName<ParTestRegNameAgent>("ParTestRegNameAgent");

    BEHAVIAC_DELETE(myTestAgent);
    behaviac::Workspace::GetInstance()->UnLoadAll();

    EmployeeParTestAgent::clearAllStaticMemberVariables();
    ParTestRegNameAgent::clearAllStaticMemberVariables();

    unregisterAllTypes();

    behaviac::Profiler::DestroyInstance();

	size_t allocatedSize1 = allocator.GetAllocatedSize();
	size_t allocateDiff = allocatedSize1 - allocatedSize;

#if !ENABLE_MEMORYDUMP
    //if CStringID is used before this test, CStringID::Cleaup() will free more memory
    //allocateDiff would be negative
    //CHECK_EQUAL(true, allocateDiff <= 0);
    CHECK_EQUAL(true, allocateDiff == 0);
#endif

#if ENABLE_MEMORYDUMP
    _CrtMemState s2;
    _CrtMemState s3;

    BEHAVIAC_UNUSED_VAR(s1);
    BEHAVIAC_UNUSED_VAR(s2);
    BEHAVIAC_UNUSED_VAR(s3);

    _CrtMemCheckpoint(&s2);

    //CHECK_EQUAL(0, _CrtMemDifference(&s3, &s1, &s2));
    if (_CrtMemDifference(&s3, &s1, &s2))
    {
        _CrtMemDumpStatistics(&s3);
        _CrtDumpMemoryLeaks();
    }

#endif
    BEHAVIAC_ASSERT(true);
}
Ejemplo n.º 16
0
//<
TEST(btunittest, agentInstance)
{
    behaviac::Profiler::CreateInstance();
    behaviac::Config::SetSocketing(false);
    behaviac::Config::SetLogging(false);

    registerAllTypes();

    behaviac::Agent::RegisterInstanceName<AgentNodeTest>();
    behaviac::Agent::RegisterInstanceName<behaviac::Agent>("Name_Agent_0");
    behaviac::Agent::RegisterInstanceName<behaviac::Agent>("Name_Agent_1");
    behaviac::Agent::RegisterInstanceName<behaviac::Agent>("Name_Agent_2");

    behaviac::Agent* testAgentA = behaviac::Agent::Create<behaviac::Agent>("Name_Agent_0");
    AgentNodeTest* testAgentB = behaviac::Agent::Create<AgentNodeTest>(NULL);

    behaviac::Agent* testAgent_0 = behaviac::Agent::GetInstance<behaviac::Agent>("Name_Agent_0");
    AgentNodeTest* testAgent_1 = behaviac::Agent::GetInstance<AgentNodeTest>();
#if !BEHAVIAC_RELEASE
    AgentNodeTest* testAgent_3 = AgentNodeTest::DynamicCast(behaviac::Agent::GetAgent("AgentNodeTest"));
#endif//BEHAVIAC_RELEASE

    CHECK_EQUAL(testAgent_0, testAgentA);
    CHECK_EQUAL(testAgent_1, testAgentB);
#if !BEHAVIAC_RELEASE
    CHECK_EQUAL(testAgent_1, testAgent_3);
#endif//BEHAVIAC_RELEASE
    BEHAVIAC_ASSERT(testAgent_0);
    BEHAVIAC_ASSERT(testAgent_1);

    behaviac::Agent::UnbindInstance("Name_Agent_0");
    behaviac::Agent::UnbindInstance("AgentNodeTest");

#if !BEHAVIAC_RELEASE
    testAgent_3 = AgentNodeTest::DynamicCast(behaviac::Agent::GetAgent("AgentNodeTest#AgentNodeTest"));
    CHECK_EQUAL(testAgentB, testAgent_3);
#endif//BEHAVIAC_RELEASE

    behaviac::Agent* testAgent_0_0 = behaviac::Agent::GetInstance<behaviac::Agent>("Name_Agent_0");
    AgentNodeTest* testAgent_1_0 = behaviac::Agent::GetInstance<AgentNodeTest>();

    BEHAVIAC_ASSERT(!testAgent_0_0);
    BEHAVIAC_ASSERT(!testAgent_1_0);

    behaviac::Agent::BindInstance(testAgent_0, "Name_Agent_1");
    behaviac::Agent* testAgent_0_1 = behaviac::Agent::GetInstance<behaviac::Agent>("Name_Agent_1");
    BEHAVIAC_ASSERT(testAgent_0_1);
    BEHAVIAC_UNUSED_VAR(testAgent_0_1);

    behaviac::Agent::BindInstance(testAgent_0, "Name_Agent_2");
    behaviac::Agent* testAgent_0_2 = behaviac::Agent::GetInstance<behaviac::Agent>("Name_Agent_2");
    BEHAVIAC_ASSERT(testAgent_0_2);
    BEHAVIAC_UNUSED_VAR(testAgent_0_2);

    CHECK_EQUAL(testAgent_0_1, testAgent_0_2);

    behaviac::Agent::UnbindInstance("Name_Agent_1");
    behaviac::Agent::UnbindInstance("Name_Agent_2");

    behaviac::Agent::Destroy(testAgent_0_0);
    behaviac::Agent::Destroy(testAgent_1_0);

    behaviac::Agent::UnRegisterInstanceName<behaviac::Agent>("Name_Agent_2");
    behaviac::Agent::UnRegisterInstanceName<behaviac::Agent>("Name_Agent_1");
    behaviac::Agent::UnRegisterInstanceName<behaviac::Agent>("Name_Agent_0");
    behaviac::Agent::UnRegisterInstanceName<AgentNodeTest>();

    unregisterAllTypes();

    behaviac::Profiler::DestroyInstance();
};