3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-27 16:38:45 +00:00

Tabs, formatting.

This commit is contained in:
Christoph M. Wintersteiger 2017-09-17 14:29:32 +01:00
parent 8871cb120a
commit 00651f8f21
63 changed files with 715 additions and 717 deletions

View file

@ -16,20 +16,20 @@
// and print "PASS" to indicate success.
//
#define TST(MODULE) { \
std::string s("test "); \
s += #MODULE; \
void tst_##MODULE(); \
#define TST(MODULE) { \
std::string s("test "); \
s += #MODULE; \
void tst_##MODULE(); \
if (do_display_usage) \
std::cout << #MODULE << "\n"; \
for (int i = 0; i < argc; i++) \
if (test_all || strcmp(argv[i], #MODULE) == 0) { \
for (int i = 0; i < argc; i++) \
if (test_all || strcmp(argv[i], #MODULE) == 0) { \
enable_trace(#MODULE); \
enable_debug(#MODULE); \
timeit timeit(true, s.c_str()); \
tst_##MODULE(); \
enable_debug(#MODULE); \
timeit timeit(true, s.c_str()); \
tst_##MODULE(); \
std::cout << "PASS" << std::endl; \
} \
} \
}
#define TST_ARGV(MODULE) { \
@ -39,13 +39,13 @@
if (do_display_usage) \
std::cout << #MODULE << "\n"; \
for (int i = 0; i < argc; i++) \
if (strcmp(argv[i], #MODULE) == 0) { \
if (strcmp(argv[i], #MODULE) == 0) { \
enable_trace(#MODULE); \
enable_debug(#MODULE); \
timeit timeit(true, s.c_str()); \
tst_##MODULE(argv, argc, i); \
enable_debug(#MODULE); \
timeit timeit(true, s.c_str()); \
tst_##MODULE(argv, argc, i); \
std::cout << "PASS" << std::endl; \
} \
} \
}
void error(const char * msg) {
@ -76,49 +76,49 @@ void display_usage() {
void parse_cmd_line_args(int argc, char ** argv, bool& do_display_usage, bool& test_all) {
int i = 1;
while (i < argc) {
char * arg = argv[i], *eq_pos = 0;
char * arg = argv[i], *eq_pos = 0;
if (arg[0] == '-' || arg[0] == '/') {
char * opt_name = arg + 1;
char * opt_arg = 0;
char * colon = strchr(arg, ':');
if (colon) {
opt_arg = colon + 1;
*colon = 0;
}
if (strcmp(opt_name, "h") == 0 ||
if (arg[0] == '-' || arg[0] == '/') {
char * opt_name = arg + 1;
char * opt_arg = 0;
char * colon = strchr(arg, ':');
if (colon) {
opt_arg = colon + 1;
*colon = 0;
}
if (strcmp(opt_name, "h") == 0 ||
strcmp(opt_name, "?") == 0) {
display_usage();
display_usage();
do_display_usage = true;
return;
}
else if (strcmp(opt_name, "v") == 0) {
if (!opt_arg)
error("option argument (/v:level) is missing.");
long lvl = strtol(opt_arg, 0, 10);
set_verbosity_level(lvl);
}
else if (strcmp(opt_name, "w") == 0) {
}
else if (strcmp(opt_name, "v") == 0) {
if (!opt_arg)
error("option argument (/v:level) is missing.");
long lvl = strtol(opt_arg, 0, 10);
set_verbosity_level(lvl);
}
else if (strcmp(opt_name, "w") == 0) {
enable_warning_messages(true);
}
else if (strcmp(opt_name, "a") == 0) {
}
else if (strcmp(opt_name, "a") == 0) {
test_all = true;
}
}
#ifdef _TRACE
else if (strcmp(opt_name, "tr") == 0) {
if (!opt_arg)
error("option argument (/tr:tag) is missing.");
enable_trace(opt_arg);
}
else if (strcmp(opt_name, "tr") == 0) {
if (!opt_arg)
error("option argument (/tr:tag) is missing.");
enable_trace(opt_arg);
}
#endif
#ifdef Z3DEBUG
else if (strcmp(opt_name, "dbg") == 0) {
if (!opt_arg)
error("option argument (/dbg:tag) is missing.");
enable_debug(opt_arg);
}
else if (strcmp(opt_name, "dbg") == 0) {
if (!opt_arg)
error("option argument (/dbg:tag) is missing.");
enable_debug(opt_arg);
}
#endif
}
}
else if (arg[0] != '"' && (eq_pos = strchr(arg, '='))) {
char * key = arg;
*eq_pos = 0;
@ -130,7 +130,7 @@ void parse_cmd_line_args(int argc, char ** argv, bool& do_display_usage, bool& t
std::cerr << ex.msg() << "\n";
}
}
i++;
i++;
}
}