aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-16 09:30:22 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-16 09:30:22 -0400
commita6627fdb80935d68b8e7f1c4e098f8ce54894842 (patch)
tree0fd6bff96ab59e4fbed48e54dd27d77eb82d8c28 /src/test/test.h
parentc72a94ea1c51b53aa174f82da11cdbc8a99b3c40 (diff)
downloadtor-a6627fdb80935d68b8e7f1c4e098f8ce54894842.tar.gz
tor-a6627fdb80935d68b8e7f1c4e098f8ce54894842.zip
Remove the legacy_test_helper and legacy_setup wrappers
These wrappers went into place when the default type for our unit test functions changed from "void fn(void)" to "void fn(void *arg)". To generate this patch, I did the same hokey-pokey as before with replacing all operators used as macro arguments, then I ran a coccinelle script, then I ran perl script to fix up everything that used legacy_test_helper, then I manually removed the legacy_test_helper functions, then I ran a final perl script to put the operators back how they were. ============================== #!/usr/bin/perl -w -i -p s/==,/_X_EQ_,/g; s/!=,/_X_NE_,/g; s/<,/_X_LT_,/g; s/>,/_X_GT_,/g; s/>=,/_X_GEQ_,/g; s/<=,/_X_LEQ_,/g; -------------------- @@ identifier func =~ "test_.*$"; statement S, S2; @@ static void func ( -void +void *arg ) { ... when != S2 +(void) arg; S ... } -------------------- #!/usr/bin/perl -w -i -p s/, *legacy_test_helper, *([^,]+), *\&legacy_setup, *([^\}]+) *}/, $2, $1, NULL, NULL }/g; -------------------- #!/usr/bin/perl -w -i -p s/_X_NEQ_/!=/g; s/_X_NE_/!=/g; s/_X_EQ_/==/g; s/_X_GT_/>/g; s/_X_LT_/</g; s/_X_GEQ_/>=/g; s/_X_LEQ_/<=/g; --------------------
Diffstat (limited to 'src/test/test.h')
-rw-r--r--src/test/test.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/test/test.h b/src/test/test.h
index c2b333c286..8eb2dfc016 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -66,9 +66,6 @@
const char *get_fname(const char *name);
crypto_pk_t *pk_generate(int idx);
-void legacy_test_helper(void *data);
-extern const struct testcase_setup_t legacy_setup;
-
#define US2_CONCAT_2__(a, b) a ## __ ## b
#define US_CONCAT_2__(a, b) a ## _ ## b
#define US_CONCAT_3__(a, b, c) a ## _ ## b ## _ ## c