Use CHECK instead of ENSURE in test suite. (Ticket #250)

This commit is contained in:
Stefan Kangas 2010-12-10 03:01:38 +01:00 committed by Ichthyostega
parent 518f4bac1a
commit 0fac2b6569
7 changed files with 19 additions and 19 deletions

View file

@ -38,7 +38,7 @@ TEST ("basic")
int fd = lumiera_file_handle_acquire (file);
/* we now 'own'it and can use it */
ENSURE (fd > -1);
CHECK (fd > -1);
printf ("got filehandle #%d\n", fd);
/* put it into aging, can't use anymore */
@ -67,7 +67,7 @@ TEST ("more")
for (int i=0; i<100; ++i)
{
fds[i] = lumiera_file_handle_acquire (files[i]);
ENSURE (fds[i] > -1);
CHECK (fds[i] > -1);
printf ("got filehandle #%d\n", fds[i]);
}

View file

@ -159,7 +159,7 @@ TEST (mmap_simple)
/* check that the file got truncated to the desired size */
struct stat st;
stat (",tmp-filemmap", &st);
ENSURE (st.st_size == 100);
CHECK (st.st_size == 100);
lumiera_backend_destroy ();
lumiera_config_destroy ();
@ -179,7 +179,7 @@ TEST (mmap_checkout_twice)
LumieraMMap map2 = lumiera_mmapings_mmap_acquire (mmaps, file, 0, 100);
ENSURE (map->address == map2->address);
CHECK (map->address == map2->address);
lumiera_mmapings_release_mmap (mmaps, map);
@ -190,7 +190,7 @@ TEST (mmap_checkout_twice)
/* check that the file got truncated to the desired size */
struct stat st;
stat (",tmp-filemmap", &st);
ENSURE (st.st_size == 100);
CHECK (st.st_size == 100);
lumiera_backend_destroy ();
lumiera_config_destroy ();
@ -217,7 +217,7 @@ TEST (mmap_checkout_again)
/* check that the file got truncated to the desired size */
struct stat st;
stat (",tmp-filemmap", &st);
ENSURE (st.st_size == 100);
CHECK (st.st_size == 100);
lumiera_backend_destroy ();
lumiera_config_destroy ();
@ -242,7 +242,7 @@ TEST (mmap_grow_existing_file)
/* check that the file got truncated to the desired size */
struct stat st;
stat (",tmp-filemmap", &st);
ENSURE (st.st_size == 100);
CHECK (st.st_size == 100);
lumiera_backend_destroy ();
lumiera_config_destroy ();
@ -266,7 +266,7 @@ TEST (mmap_readonly_file)
/* check that the file got truncated to the desired size */
struct stat st;
stat (",tmp-filemmap", &st);
ENSURE (st.st_size == 100);
CHECK (st.st_size == 100);
lumiera_backend_destroy ();
lumiera_config_destroy ();

View file

@ -44,7 +44,7 @@ TEST (configitem_simple)
LumieraConfigitem item;
item = lumiera_configitem_new (argv[2]);
ENSURE (item);
CHECK (item);
printf ("line = '%s'\n", item->line);
if (item->key)
@ -71,10 +71,10 @@ TEST (lookup)
lumiera_config_lookup_insert (&lookup, item);
LumieraConfigitem found = lumiera_config_lookup_item_find (&lookup, "foo.bar");
ENSURE (found == item);
CHECK (found == item);
lumiera_config_lookup_remove (&lookup, found);
ENSURE (!lumiera_config_lookup_item_find (&lookup, "foo.bar"));
CHECK (!lumiera_config_lookup_item_find (&lookup, "foo.bar"));
lumiera_config_lookup_destroy (&lookup);
lumiera_config_destroy ();

View file

@ -71,13 +71,13 @@ namespace test {
// consistency checks
std::ostringstream output;
output << theCmdline;
ENSURE (output.str() == string(theCmdline));
CHECK (output.str() == string(theCmdline));
i=0;
string token;
std::istringstream input(theCmdline);
while (input >> token)
ENSURE (token == theCmdline[i++]);
CHECK (token == theCmdline[i++]);
}
/** @test wrapping a (albeit faked) standard commandline

View file

@ -199,7 +199,7 @@ TEST (relocate)
target = source;
llist_relocate (&target);
ENSURE (llist_is_head (&target, &something));
CHECK (llist_is_head (&target, &something));
}

View file

@ -241,22 +241,22 @@ TEST ("insert_find")
//TestItem f = (TestItem) psplay_find (&splay_tree, "baz", 100);
TestItem f = (TestItem) psplay_find (&splay_tree, "baz", 100);
ENSURE (f);
CHECK (f);
printf ("found %p (%.4s)\n", &f->node, f->key);
psplay_dump (&splay_tree, stdout);
f = (TestItem) psplay_find (&splay_tree, "test", 100);
ENSURE (f);
CHECK (f);
printf ("found %p (%.4s)\n", &f->node, f->key);
psplay_dump (&splay_tree, stdout);
f = (TestItem) psplay_find (&splay_tree, "test", 100);
ENSURE (f);
CHECK (f);
printf ("found %p (%.4s)\n", &f->node, f->key);
psplay_dump (&splay_tree, stdout);
f = (TestItem) psplay_find (&splay_tree, "foo", 100);
ENSURE (f);
CHECK (f);
printf ("found %p (%.4s)\n", &f->node, f->key);
psplay_dump (&splay_tree, stdout);

View file

@ -37,7 +37,7 @@ TEST (allocation1024)
for (int i = 0; i < 1024; ++i)
{
data[i] = lumiera_malloc (1024);
ENSURE (data[i]);
CHECK (data[i]);
}
for (int i = 0; i < 1024; ++i)
{