From 25524dc99fe86d8e6f1994196b3d7e3fb54220cd Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Fri, 18 Mar 2011 19:35:31 +0000 Subject: [PATCH] Fix tests This was SVN commit r9080. --- .../mods/_test.sim/simulation/templates/unit.xml | 2 ++ .../simulation/templates/unitobstruct.xml | 2 ++ source/simulation2/tests/test_CmpTemplateManager.h | 14 ++++++++------ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/binaries/data/mods/_test.sim/simulation/templates/unit.xml b/binaries/data/mods/_test.sim/simulation/templates/unit.xml index 8aa0c9c5e4..f3066ac95f 100644 --- a/binaries/data/mods/_test.sim/simulation/templates/unit.xml +++ b/binaries/data/mods/_test.sim/simulation/templates/unit.xml @@ -2,6 +2,8 @@ example + false + false diff --git a/binaries/data/mods/_test.sim/simulation/templates/unitobstruct.xml b/binaries/data/mods/_test.sim/simulation/templates/unitobstruct.xml index 2e7edd3731..d06e0018cf 100644 --- a/binaries/data/mods/_test.sim/simulation/templates/unitobstruct.xml +++ b/binaries/data/mods/_test.sim/simulation/templates/unitobstruct.xml @@ -2,6 +2,8 @@ example + false + false diff --git a/source/simulation2/tests/test_CmpTemplateManager.h b/source/simulation2/tests/test_CmpTemplateManager.h index e90d1875bf..cfc90977d3 100644 --- a/source/simulation2/tests/test_CmpTemplateManager.h +++ b/source/simulation2/tests/test_CmpTemplateManager.h @@ -77,14 +77,16 @@ public: const CParamNode* actor = tempMan->LoadTemplate(ent2, "actor|example1", -1); TS_ASSERT(actor != NULL); - TS_ASSERT_WSTR_EQUALS(actor->ToXML(), L"0uprightfalseexample1"); + TS_ASSERT_WSTR_EQUALS(actor->ToXML(), + L"0uprightfalse" + L"example1falsefalse"); const CParamNode* preview = tempMan->LoadTemplate(ent2, "preview|unit", -1); TS_ASSERT(preview != NULL); TS_ASSERT_WSTR_EQUALS(preview->ToXML(), L"0uprightfalse" L"true0false" - L"example"); + L"examplefalsefalse"); const CParamNode* previewobstruct = tempMan->LoadTemplate(ent2, "preview|unitobstruct", -1); TS_ASSERT(previewobstruct != NULL); @@ -98,14 +100,14 @@ public: L"" L"0uprightfalse" L"true0false" - L"example"); + L"examplefalsefalse"); const CParamNode* previewactor = tempMan->LoadTemplate(ent2, "preview|actor|example2", -1); TS_ASSERT(previewactor != NULL); TS_ASSERT_WSTR_EQUALS(previewactor->ToXML(), L"0uprightfalse" L"true0false" - L"example2"); + L"example2falsefalse"); } void test_LoadTemplate_scriptcache() @@ -138,11 +140,11 @@ public: const CParamNode* actor = tempMan->LoadTemplate(ent2, "actor|example1", -1); val = CScriptValRooted(cx, ScriptInterface::ToJSVal(cx, &actor->GetChild("VisualActor"))); - TS_ASSERT_WSTR_EQUALS(man.GetScriptInterface().ToString(val.get()), L"({Actor:\"example1\"})"); + TS_ASSERT_WSTR_EQUALS(man.GetScriptInterface().ToString(val.get()), L"({Actor:\"example1\", SilhouetteDisplay:\"false\", SilhouetteOccluder:\"false\"})"); const CParamNode* foundation = tempMan->LoadTemplate(ent2, "foundation|actor|example1", -1); val = CScriptValRooted(cx, ScriptInterface::ToJSVal(cx, &foundation->GetChild("VisualActor"))); - TS_ASSERT_WSTR_EQUALS(man.GetScriptInterface().ToString(val.get()), L"({Actor:\"example1\", Foundation:(void 0)})"); + TS_ASSERT_WSTR_EQUALS(man.GetScriptInterface().ToString(val.get()), L"({Actor:\"example1\", Foundation:(void 0), SilhouetteDisplay:\"false\", SilhouetteOccluder:\"false\"})"); } void test_LoadTemplate_errors()