aboutsummaryrefslogtreecommitdiff
path: root/minctest.h
diff options
context:
space:
mode:
authorCamil Staps2016-08-28 19:13:27 +0200
committerGitHub2016-08-28 19:13:27 +0200
commit720d9ac1dc4e9aeb96a9cef73e2ef0ca562388ae (patch)
tree196b19a2252cd53861fafb1810aa5572a86cb906 /minctest.h
parentMore timing (diff)
parenttabs>spacE' (diff)
Merge pull request #1 from dopefishh/master
linux kernel coding style, remove deprecated libraries
Diffstat (limited to 'minctest.h')
-rw-r--r--minctest.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/minctest.h b/minctest.h
index 64b4519..071a5af 100644
--- a/minctest.h
+++ b/minctest.h
@@ -15,21 +15,21 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MINCTEST_MINCTEST_H
-#define MINCTEST_MINCTEST_H
+#ifndef MINCTEST_H
+#define MINCTEST_H
-#include <inttypes.h>
+#include <stdint.h>
#include <stdbool.h>
#include <sys/time.h>
-typedef struct {
- uint16_t passed; // Number of passed tests
- uint16_t failed; // Number of failed tests
- bool show_pass; // Whether or not to print a message when a test passes
- struct timeval start_last_test; // Time last test was started
- struct timeval created; // Time this was created
- __suseconds_t used; // usecs used for tests
-} tester;
+struct tester {
+ uint16_t passed; // Number of passed tests
+ uint16_t failed; // Number of failed tests
+ bool show_pass; // Whether or not to print a message when a test passes
+ struct timeval start_last_test; // Time last test was started
+ struct timeval created; // Time this was created
+ __suseconds_t used; // usecs used for tests
+};
/**
* Initialize a tester struct
@@ -39,7 +39,7 @@ typedef struct {
*
* @return a struct on the heap for use in the other test_* functions
*/
-tester* test_initialize(void);
+struct tester *test_initialize(void);
/**
* Show summarised data about the tester
@@ -49,7 +49,7 @@ tester* test_initialize(void);
*
* @param tester* a pointer to a tester from test_initialize
*/
-void test_wrapup(tester*);
+void test_wrapup(struct tester *);
/**
* Destroy a tester struct
@@ -58,7 +58,7 @@ void test_wrapup(tester*);
*
* @param tester* a pointer to a tester from test_initialize
*/
-void test_destroy(tester*);
+void test_destroy(struct tester *);
/**
* Exit the program with an appropriate return value
@@ -68,12 +68,12 @@ void test_destroy(tester*);
* @param tester* a pointer to a tester from test_initialize
* @return don't expect this to return
*/
-void test_exit(tester*);
+void test_exit(struct tester *);
/**
* Start the timer for a test
*/
-void test_start_timer(tester*);
+void test_start_timer(struct tester *);
/**
* Test for truth on a bool
@@ -86,6 +86,6 @@ void test_start_timer(tester*);
* @param check the boolean that should be true
* @param test a custom message to show
*/
-void test_true(tester* tester, bool check, const char* text);
+void test_true(struct tester *tester, bool check, const char* text);
-#endif // MINCTEST_MINCTEST_H
+#endif // MINCTEST_H