Unit-Test impl

Implements functions defined in Unit-Test.

Summary
Unit-Test implImplements functions defined in Unit-Test.
CopyrightThis program is free software.
Files
C-kern/api/test/unittest.hHeader file of Unit-Test.
C-kern/test/unittest.cImplementation file Unit-Test impl.
unittest_tHolds mutex_t to make it thread-safe.
static variables
s_unittest_singletonHolds the context for all running unit tests.
lifetime
report
logfile
writelogfile_unittestWrites errlog to s_unittest_singleton.log_files_directory + “/” + testname.
comparelogfile_unittestCompares stored errlog file with content of current error log.
execute
test

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2011 Jörg Seebohn

Files

C-kern/api/test/unittest.h

Header file of Unit-Test.

C-kern/test/unittest.c

Implementation file Unit-Test impl.

unittest_t

struct unittest_t

Holds mutex_t to make it thread-safe.

Summary
static variables
s_unittest_singletonHolds the context for all running unit tests.
lifetime
report
logfile
writelogfile_unittestWrites errlog to s_unittest_singleton.log_files_directory + “/” + testname.
comparelogfile_unittestCompares stored errlog file with content of current error log.
execute
test

static variables

s_unittest_singleton

static unittest_t s_unittest_singleton

Holds the context for all running unit tests.

lifetime

report

logfile

writelogfile_unittest

static int writelogfile_unittest(const char *testname)

Writes errlog to s_unittest_singleton.log_files_directory + “/” + testname.

comparelogfile_unittest

static int comparelogfile_unittest(const char *testname)

Compares stored errlog file with content of current error log.

execute

test

Defines a functions to execute a single unit test.
Implements functions defined in Unit-Test.
struct unittest_t
Holds mutex_t to make it thread-safe.
static unittest_t s_unittest_singleton
Holds the context for all running unit tests.
static int writelogfile_unittest(const char *testname)
Writes errlog to s_unittest_singleton.log_files_directory + “/” + testname.
static int comparelogfile_unittest(const char *testname)
Compares stored errlog file with content of current error log.
Close