2016-11-02 18:09:38 +00:00
|
|
|
#include "repo/test_repo_config.h"
|
2016-10-31 22:19:27 +00:00
|
|
|
#include "repo/test_repo_identity.h"
|
2016-11-02 18:09:38 +00:00
|
|
|
#include "repo/test_repo_bootstrap_peers.h"
|
2016-10-27 01:14:07 +00:00
|
|
|
#include "cmd/ipfs/test_init.h"
|
|
|
|
|
|
|
|
int testit(const char* name, int (*func)(void)) {
|
|
|
|
printf("Testing %s...\n", name);
|
|
|
|
int retVal = func();
|
|
|
|
if (retVal)
|
|
|
|
printf("%s success!\n", name);
|
|
|
|
else
|
|
|
|
printf("** Uh oh! %s failed.**\n", name);
|
|
|
|
return retVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
2016-11-02 18:09:38 +00:00
|
|
|
testit("test_repo_config_init", test_repo_config_init);
|
2016-11-03 04:05:29 +00:00
|
|
|
testit("test_repo_config_write", test_repo_config_write);
|
2016-10-31 16:13:42 +00:00
|
|
|
testit("test_repo_config_identity_new", test_repo_config_identity_new);
|
2016-10-31 22:19:27 +00:00
|
|
|
testit("test_repo_config_identity_private_key", test_repo_config_identity_private_key);
|
2016-11-02 18:09:38 +00:00
|
|
|
testit("test_reop_bootstrap_peers_init", test_repo_bootstrap_peers_init);
|
2016-10-27 01:14:07 +00:00
|
|
|
testit("get_init_command", test_get_init_command);
|
2016-11-02 18:09:38 +00:00
|
|
|
|
2016-10-27 01:14:07 +00:00
|
|
|
return 1;
|
|
|
|
}
|