diff options
| author | Leonetienne <leonetienne@hotmail.de> | 2022-03-19 08:33:01 +0100 |
|---|---|---|
| committer | Leonetienne <leonetienne@hotmail.de> | 2022-03-19 08:47:54 +0100 |
| commit | 577bc93d6d2fa2645a121c7c454248d8a663a8b6 (patch) | |
| tree | cb1c5099bdb70ef7f809be7af8550830e594ec07 /Test | |
| parent | b172ec9ee901d95bdd959665399a87ff033ed9a9 (diff) | |
Move all uwu-related code to its own header, and create a few dont-crash tests
awso fixed stwing-out-of-range bug.
Diffstat (limited to 'Test')
| -rw-r--r-- | Test/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | Test/HappyPath.cpp | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Test/CMakeLists.txt b/Test/CMakeLists.txt index c8d4f67..afdd2c6 100644 --- a/Test/CMakeLists.txt +++ b/Test/CMakeLists.txt @@ -20,6 +20,7 @@ add_executable(Test # Uwwwu-Tests ConditionalReplaceButKeepSigns.cpp + HappyPath.cpp ) target_link_libraries(Test StringTools) diff --git a/Test/HappyPath.cpp b/Test/HappyPath.cpp new file mode 100644 index 0000000..7ed31f0 --- /dev/null +++ b/Test/HappyPath.cpp @@ -0,0 +1,17 @@ +#include <LibUwu.h> +#include "Catch2.h" + +// Tests that the program doesnt crash with random input +TEST_CASE(__FILE__"/DoesntCrash", "[]") +{ + SECTION("0") { MakeUwu("nine"); } + SECTION("1") { MakeUwu("nintendo"); } + SECTION("2") { MakeUwu("one"); } + SECTION("3") { MakeUwu("rally"); } + SECTION("4") { MakeUwu("lary"); } + SECTION("5") { MakeUwu("larry"); } + SECTION("6") { MakeUwu("wally"); } + SECTION("7") { MakeUwu("waly"); } + SECTION("8") { MakeUwu("gardener"); } + SECTION("9") { MakeUwu("german"); } +} |
