diff options
Diffstat (limited to 'Tests/TestDriver')
| -rw-r--r-- | Tests/TestDriver/subdir/test3.cxx | 4 | ||||
| -rw-r--r-- | Tests/TestDriver/test1.cxx | 17 | ||||
| -rw-r--r-- | Tests/TestDriver/test2.cxx | 4 | ||||
| -rw-r--r-- | Tests/TestDriver/testArgs.h | 20 |
4 files changed, 19 insertions, 26 deletions
diff --git a/Tests/TestDriver/subdir/test3.cxx b/Tests/TestDriver/subdir/test3.cxx index 976d6ebaa2..c5a83de5e6 100644 --- a/Tests/TestDriver/subdir/test3.cxx +++ b/Tests/TestDriver/subdir/test3.cxx @@ -1,8 +1,8 @@ #include <stdio.h> -int subdir_test3(int ac, char*av[]) +int subdir_test3(int ac, char* av[]) { printf("test3\n"); - for(int i =0; i < ac; i++) + for (int i = 0; i < ac; i++) printf("arg %d is %s\n", ac, av[i]); return 0; } diff --git a/Tests/TestDriver/test1.cxx b/Tests/TestDriver/test1.cxx index b998fdae6d..59a6fce959 100644 --- a/Tests/TestDriver/test1.cxx +++ b/Tests/TestDriver/test1.cxx @@ -5,21 +5,18 @@ int testExtraStuff2(); int test1(int ac, char* av[]) { - if(!testExtraStuff2()) - { + if (!testExtraStuff2()) { return -1; - } - if(!testExtraStuff()) - { + } + if (!testExtraStuff()) { return -1; - } - if(!testExtraStuff3()) - { + } + if (!testExtraStuff3()) { return -1; - } + } printf("test1\n"); - for(int i =0; i < ac; i++) + for (int i = 0; i < ac; i++) printf("arg %d is %s\n", ac, av[i]); return 0; } diff --git a/Tests/TestDriver/test2.cxx b/Tests/TestDriver/test2.cxx index 69f0fff174..08d1e6f724 100644 --- a/Tests/TestDriver/test2.cxx +++ b/Tests/TestDriver/test2.cxx @@ -1,8 +1,8 @@ #include <stdio.h> -int test2(int ac, char*av[]) +int test2(int ac, char* av[]) { printf("test2\n"); - for(int i =0; i < ac; i++) + for (int i = 0; i < ac; i++) printf("arg %d is %s\n", ac, av[i]); return 0; } diff --git a/Tests/TestDriver/testArgs.h b/Tests/TestDriver/testArgs.h index 04893660ba..0f1b879ec6 100644 --- a/Tests/TestDriver/testArgs.h +++ b/Tests/TestDriver/testArgs.h @@ -1,20 +1,16 @@ -void testProccessArgs(int* ac, char***av) +void testProccessArgs(int* ac, char*** av) { char** argv = *av; - if(*ac < 2) - { + if (*ac < 2) { return; - } - if(strcmp(argv[1], "--with-threads") == 0) - { + } + if (strcmp(argv[1], "--with-threads") == 0) { printf("number of threads is %s\n", argv[2]); - *av +=2; - *ac -=2; - } - else if (strcmp(argv[1], "--without-threads") == 0) - { + *av += 2; + *ac -= 2; + } else if (strcmp(argv[1], "--without-threads") == 0) { printf("no threads\n"); *av += 1; *ac -= 1; - } + } } |
