1
1
forked from 0ad/0ad

Fixes tests adding system components without using the SYSTEM_ENTITY id - this caused assertion failures in debug builds

This was SVN commit r16803.
This commit is contained in:
historic_bruno 2015-06-21 19:22:12 +00:00
parent ae4dfe294d
commit c5814ef76c
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2015 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -40,7 +40,7 @@ public:
std::vector<SimulationCommand> empty;
ICmpCommandQueue* cmp = test.Add<ICmpCommandQueue>(CID_CommandQueue, "");
ICmpCommandQueue* cmp = test.Add<ICmpCommandQueue>(CID_CommandQueue, "", SYSTEM_ENTITY);
TS_ASSERT(test.GetScriptInterface().Eval("var cmds = []; function ProcessCommand(player, cmd) { cmds.push([player, cmd]); }"));

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games.
/* Copyright (C) 2015 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -71,7 +71,7 @@ public:
ent3g = ent3;
testHelper = new ComponentTestHelper(g_ScriptRuntime);
cmp = testHelper->Add<ICmpObstructionManager>(CID_ObstructionManager, "");
cmp = testHelper->Add<ICmpObstructionManager>(CID_ObstructionManager, "", SYSTEM_ENTITY);
cmp->SetBounds(fixed::FromInt(0), fixed::FromInt(0), fixed::FromInt(1000), fixed::FromInt(1000));
shape1 = cmp->AddStaticShape(ent1, ent1x, ent1z, ent1a, ent1w, ent1h,

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games.
/* Copyright (C) 2015 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -89,7 +89,7 @@ public:
{
ComponentTestHelper test(g_ScriptRuntime);
ICmpRangeManager* cmp = test.Add<ICmpRangeManager>(CID_RangeManager, "");
ICmpRangeManager* cmp = test.Add<ICmpRangeManager>(CID_RangeManager, "", SYSTEM_ENTITY);
MockVision vision;
test.AddMock(100, IID_Vision, vision);