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; --------------------
Showing
- src/test/test.c 16 additions, 34 deletionssrc/test/test.c
- src/test/test.h 0 additions, 3 deletionssrc/test/test.h
- src/test/test_addr.c 7 additions, 4 deletionssrc/test/test_addr.c
- src/test/test_containers.c 24 additions, 12 deletionssrc/test/test_containers.c
- src/test/test_crypto.c 17 additions, 9 deletionssrc/test/test_crypto.c
- src/test/test_dir.c 21 additions, 11 deletionssrc/test/test_dir.c
- src/test/test_introduce.c 25 additions, 13 deletionssrc/test/test_introduce.c
- src/test/test_pt.c 5 additions, 3 deletionssrc/test/test_pt.c
- src/test/test_replay.c 23 additions, 12 deletionssrc/test/test_replay.c
- src/test/test_util.c 41 additions, 21 deletionssrc/test/test_util.c
Loading
Please register or sign in to comment