mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
unittest: use common_setup / common_shutdown almost everywhere.
Avoids much cut & paste. Some tests don't need any of it, but most want at least some of this infrastructure. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <common/amount.h>
|
||||
#include <common/utils.h>
|
||||
#include <common/json.c>
|
||||
#include <common/setup.h>
|
||||
#include <wire/wire.h>
|
||||
|
||||
/* AUTOGENERATED MOCKS START */
|
||||
@@ -264,10 +265,9 @@ static void remove_inside_obj(void)
|
||||
"4", "four", NULL);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
setup_locale();
|
||||
setup_tmpctx();
|
||||
common_setup(argv[0]);
|
||||
|
||||
sanity();
|
||||
remove_one();
|
||||
@@ -278,6 +278,6 @@ int main(void)
|
||||
remove_complex();
|
||||
remove_inside_obj();
|
||||
|
||||
tal_free(tmpctx);
|
||||
printf("run-json_remove ok\n");
|
||||
common_shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user