1
0
forked from 0ad/0ad

Fix tests

This was SVN commit r8077.
This commit is contained in:
Ykkrosh 2010-09-04 21:29:27 +00:00
parent 6c7830df3f
commit b1e32f9542
2 changed files with 9 additions and 5 deletions

View File

@ -29,7 +29,8 @@ AddMock(100, IID_Player, {
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 }; },
IsTrainingQueueBlocked: function() { return false; },
});
AddMock(101, IID_Player, {
@ -38,7 +39,8 @@ AddMock(101, IID_Player, {
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 }; },
IsTrainingQueueBlocked: function() { return false; },
});
TS_ASSERT_UNEVAL_EQUALS(cmp.GetSimulationState(), {
@ -49,7 +51,8 @@ TS_ASSERT_UNEVAL_EQUALS(cmp.GetSimulationState(), {
color: { r:1, g:1, b:1, a:1 },
popCount: 10,
popLimit: 20,
resourceCounts: { food: 100 }
resourceCounts: { food: 100 },
trainingQueueBlocked: false,
},
{
name: "Player 2",
@ -57,7 +60,8 @@ TS_ASSERT_UNEVAL_EQUALS(cmp.GetSimulationState(), {
color: { r:1, g:0, b:0, a:1 },
popCount: 40,
popLimit: 30,
resourceCounts: { food: 200 }
resourceCounts: { food: 200 },
trainingQueueBlocked: false,
}
]
});

View File

@ -36,7 +36,7 @@ public:
void test_overflow()
{
const int buflen = 512;
const int buflen = 1024;
std::string msg0 (buflen-2, '*');
std::string msg1 (buflen-1, '*');