commit e09a822b7449bea228d8ce238031e080a2fca631
parent 9149dbdc4e837b7a28a5cece20ca79efbbb44735
Author: William Casarin <jb55@jb55.com>
Date: Mon, 3 Jun 2019 19:31:20 -0700
test compile fixes
Diffstat:
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/deps/tap.c/tap.c b/deps/tap.c/tap.c
@@ -229,8 +229,7 @@ exit_status () {
return retval;
}
-int
-bail_out (int ignore, const char *fmt, ...) {
+int bail_out (const char *fmt, ...) {
va_list args;
va_start(args, fmt);
printf("Bail out! ");
@@ -241,8 +240,7 @@ bail_out (int ignore, const char *fmt, ...) {
return 0;
}
-void
-tap_skip (int n, const char *fmt, ...) {
+void tap_skip (int n, const char *fmt, ...) {
char *why;
va_list args;
va_start(args, fmt);
@@ -255,8 +253,7 @@ tap_skip (int n, const char *fmt, ...) {
free(why);
}
-void
-tap_todo (int ignore, const char *fmt, ...) {
+void tap_todo (const char *fmt, ...) {
va_list args;
va_start(args, fmt);
todo_mesg = vstrdupf(fmt, args);
diff --git a/deps/tap.c/tap.h b/deps/tap.c/tap.h
@@ -33,13 +33,13 @@ int isnt_at_loc (const char *file, int line, const char *got,
const char *expected, const char *fmt, ...);
int cmp_ok_at_loc (const char *file, int line, int a, const char *op,
int b, const char *fmt, ...);
-int bail_out (int ignore, const char *fmt, ...);
+int bail_out (const char *fmt, ...);
void tap_plan (int tests, const char *fmt, ...);
int diag (const char *fmt, ...);
int note (const char *fmt, ...);
int exit_status (void);
void tap_skip (int n, const char *fmt, ...);
-void tap_todo (int ignore, const char *fmt, ...);
+void tap_todo (const char *fmt, ...);
void tap_end_todo (void);
#define NO_PLAN -1
diff --git a/test.c b/test.c
@@ -4,16 +4,17 @@
#include "op.h"
#include "alloc.h"
#include "valstack.h"
+#include "compiler.h"
#include "tap.c/tap.h"
typedef void (program)(struct stack *script, struct stack *stack,\
struct result *result, struct stack *expected);
#define RUNTEST(test) run_test(script, stack, expected, result, test)
-#define TEST(test) static inline void test(struct stack *script, \
+#define TEST(test) static inline void test(struct stack *script UNUSED, \
struct stack *stack, \
struct result *result, \
- struct stack *expected \
+ struct stack *expected UNUSED \
)
@@ -57,7 +58,7 @@ ok_stacks_equal(struct stack *s1, struct stack *s2, const char *context) {
v1 = stack_top_val(s1, i);
v2 = stack_top_val(s2, i);
- if (!val_eq(v1, v2, 0)) {
+ if (!val_eq(v1, v2)) {
is(val_name(v1), val_name(v2), "%s: stack vals match", context);
}
}
@@ -194,7 +195,7 @@ run_test(struct stack *script, struct stack *stack, struct stack *expected,
int
-main(int argc, char *argv[]) {
+main(int argc UNUSED, char *argv[] UNUSED) {
struct stack _stack, _expected, _script;
struct result _result;
struct stack *script = &_script;