diff --git a/README.md b/README.md index 8a49bd2..6d7a200 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ## Design ## -UTest is a single header library to enable all the fun of unit testing in C and C++. The library has been designed to provide an output similar to Google's googletest framework; +UTest is a single header library to enable all the fun of unit testing in C and C++. The library has been designed to provide an output similar to Google's googletest framework: [==========] Running 1 test cases. [ RUN ] foo.bar diff --git a/README.md b/README.md index 8a49bd2..6d7a200 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ## Design ## -UTest is a single header library to enable all the fun of unit testing in C and C++. The library has been designed to provide an output similar to Google's googletest framework; +UTest is a single header library to enable all the fun of unit testing in C and C++. The library has been designed to provide an output similar to Google's googletest framework: [==========] Running 1 test cases. [ RUN ] foo.bar diff --git a/utest.h b/utest.h index 90ee593..f4247d7 100644 --- a/utest.h +++ b/utest.h @@ -521,7 +521,7 @@ const char filter_str[] = "--filter="; const char output_str[] = "--output="; - if (0 == strncmp(argv[index], help_str, strlen(help_str))) { + if (0 == strcmp(argv[index], help_str)) { printf("utest.h - the single file unit testing solution for C/C++!\n" "Command line Options:\n" " --help Show this message and exit.\n" @@ -530,10 +530,10 @@ " --output= Output an xunit XML file to the file " "specified in .\n"); goto cleanup; - } else if (0 == strncmp(argv[index], filter_str, strlen(filter_str))) { + } else if (0 == strcmp(argv[index], filter_str)) { // user wants to filter what test cases run! filter = argv[index] + strlen(filter_str); - } else if (0 == strncmp(argv[index], output_str, strlen(output_str))) { + } else if (0 == strcmp(argv[index], output_str)) { utest_state.output = fopen(argv[index] + strlen(output_str), "w+"); } }