diff options
author | David Robillard <d@drobilla.net> | 2018-12-26 16:40:34 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-12-26 16:40:34 -0500 |
commit | 514e302b667be875f548a62979e412c39aca4034 (patch) | |
tree | 39033f06e499b7a77b3ac19c2a39f6fe1b6420fc /tests/test_utils.h | |
parent | 81ae621c06cb0f5649560a0e57580850bc8c09e5 (diff) | |
download | serd-514e302b667be875f548a62979e412c39aca4034.tar.gz serd-514e302b667be875f548a62979e412c39aca4034.tar.bz2 serd-514e302b667be875f548a62979e412c39aca4034.zip |
Remove test utilities and simply use assert for unit tests
Diffstat (limited to 'tests/test_utils.h')
-rw-r--r-- | tests/test_utils.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/tests/test_utils.h b/tests/test_utils.h deleted file mode 100644 index 815d55fd..00000000 --- a/tests/test_utils.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright 2011-2017 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef SERD_TEST_UTILS_H -#define SERD_TEST_UTILS_H - -#include <stdarg.h> -#include <stdio.h> - -static inline int -serd_test_failure(const char* fmt, ...) -{ - va_list args; - va_start(args, fmt); - fprintf(stderr, "error: "); - vfprintf(stderr, fmt, args); - va_end(args); - return 1; -} - -#define FAIL(fmt) \ - fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \ - return serd_test_failure(fmt); - -#define FAILF(fmt, ...) \ - fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \ - return serd_test_failure(fmt, __VA_ARGS__); - -#endif /* SERD_TEST_UTILS_H */ |