aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/hlkt.h29
-rw-r--r--src/include/token.h1
-rw-r--r--src/main.c8
3 files changed, 0 insertions, 38 deletions
diff --git a/src/include/hlkt.h b/src/include/hlkt.h
deleted file mode 100644
index c4db5e2..0000000
--- a/src/include/hlkt.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef HLKT_H
-#define HLKT_H
-
-#include "util.h"
-
-static int hlkt_run = 0; /* Number of tests run. */
-static int hlkt_failed = 0; /* Number of tests that have failed. */
-
-#define HLKT_HIDE(stuff) do { stuff } while (0)
-
-#define HLKT_LOG() HLKT_HIDE( \
- if ((hlkt_run > 0) && (hlkt_failed > 0)) { \
- log_err("HLKT: %d/%d tests failed", hlkt_failed, hlkt_run); \
- } else { \
- log_dbg("HLKT: all %d tests passed", hlkt_run); \
- } \
-)
-
-#define HLKT_ASS(pred) HLKT_HIDE( \
- hlkt_run ++; \
- if (! (pred)) { \
- hlkt_failed ++; \
- log_war("HLKT: test failed: %s/%s/%d", __FILE__, __func__, __LINE__); \
- } else { \
- log_dbg("HLKT: test passed: %s/%s/%d", __FILE__, __func__, __LINE__); \
- } \
-)
-
-#endif
diff --git a/src/include/token.h b/src/include/token.h
index f86c47f..f95f066 100644
--- a/src/include/token.h
+++ b/src/include/token.h
@@ -2,7 +2,6 @@
#define TOKEN_H
#include "util.h"
-#include "hlkt.h"
typedef enum TOKEN_TYPE {
TOKEN_UNKNOWN,
diff --git a/src/main.c b/src/main.c
index 3c1b8b8..476668e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,7 +2,6 @@
#include <stdlib.h>
#include "include/util.h"
-#include "include/hlkt.h"
#include "include/source.h"
#include "include/token.h"
#include "include/pp.h"
@@ -17,13 +16,11 @@ int main(int argc, char* argv[]) {
/* get source */
src = source_get(argv[1]);
- HLKT_ASS(src);
log_dbg("source gotten");
log_inf("source: %s", src);
/* create pre-processor */
pp = pp_init(src);
- HLKT_ASS(pp);
log_dbg("preprocessor created");
/* pre-process source */
@@ -33,13 +30,10 @@ int main(int argc, char* argv[]) {
log_inf("pre-processed source: %s", pp->psrc);
/* destroy pre-processor */
pp_destroy(pp);
- HLKT_ASS(src);
log_dbg("preprocessor ran");
/* create lexer */
lexer = lexer_init(src);
- HLKT_ASS(lexer);
- HLKT_ASS(lexer->src == src);
log_dbg("lexer created");
/* run lexer */
@@ -58,7 +52,5 @@ int main(int argc, char* argv[]) {
parser_destroy(parser);
free(src);
- HLKT_LOG();
-
return 0;
}