1
0
forked from 0ad/0ad

Fix simulation test

This was SVN commit r7707.
This commit is contained in:
Ykkrosh 2010-07-06 20:30:22 +00:00
parent 31699e830d
commit dc5a78af30

View File

@ -22,19 +22,42 @@ AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
AddMock(100, IID_Player, {
GetName: function() { return "Player 1"; },
GetCiv: function() { return "gaia"; },
GetColour: function() { return { r: 1, g: 1, b: 1, a: 1}; },
GetPopulationCount: function() { return 10; },
GetPopulationLimit: function() { return 20; },
GetResourceCounts: function() { return { "food": 100 }; }
GetResourceCounts: function() { return { food: 100 }; }
});
AddMock(101, IID_Player, {
GetName: function() { return "Player 2"; },
GetCiv: function() { return "celt"; },
GetColour: function() { return { r: 1, g: 0, b: 0, a: 1}; },
GetPopulationCount: function() { return 40; },
GetPopulationLimit: function() { return 30; },
GetResourceCounts: function() { return { "food": 200 }; }
GetResourceCounts: function() { return { food: 200 }; }
});
TS_ASSERT_UNEVAL_EQUALS(cmp.GetSimulationState(), {
players: [{popCount:10, popLimit:20, resourceCounts:{food:100}}, {popCount:40, popLimit:30, resourceCounts:{food:200}}]
players: [
{
name: "Player 1",
civ: "gaia",
color: { r:1, g:1, b:1, a:1 },
popCount: 10,
popLimit: 20,
resourceCounts: { food: 100 }
},
{
name: "Player 2",
civ: "celt",
color: { r:1, g:0, b:0, a:1 },
popCount: 40,
popLimit: 30,
resourceCounts: { food: 200 }
}
]
});