test case to check whether instances are sorted

This commit is contained in:
Greg Hewgill 2011-02-02 21:57:08 +13:00
parent 8eb92001b3
commit c3ad3f78e9
1 changed files with 12 additions and 0 deletions

View File

@ -66,9 +66,21 @@ private:
void run()
{
TEST_CASE(instancesSorted);
TEST_CASE(getErrorMessages);
}
void instancesSorted()
{
for (std::list<Check *>::iterator i = Check::instances().begin(); i != Check::instances().end(); ++i) {
std::list<Check *>::iterator j = i;
++j;
if (j != Check::instances().end()) {
ASSERT_EQUALS(true, (*i)->name() < (*j)->name());
}
}
}
void getErrorMessages()
{
ErrorLogger2 errorLogger;