Commit f6e1b8d7aa234dd32fb8c835b27b09ff09e3d520
Committed by
Henry Schreiner
1 parent
8961df0e
Adding windows test
Showing
3 changed files
with
18 additions
and
1 deletions
tests/CMakeLists.txt
tests/WindowsTest.cpp
0 → 100644
| 1 | +#include "app_helper.hpp" | ||
| 2 | +#include <Windows.h> | ||
| 3 | + | ||
| 4 | +// This test verifies that CLI11 still works if | ||
| 5 | +// Windows.h is included. #145 | ||
| 6 | + | ||
| 7 | +TEST_F(TApp, WindowsTestSimple) { | ||
| 8 | + app.add_flag("-c,--count"); | ||
| 9 | + args = {"-c"}; | ||
| 10 | + run(); | ||
| 11 | + EXPECT_EQ((size_t)1, app.count("-c")); | ||
| 12 | + EXPECT_EQ((size_t)1, app.count("--count")); | ||
| 13 | +} |
tests/link_test_2.cpp
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | 4 | ||
| 5 | int do_nothing(); | 5 | int do_nothing(); |
| 6 | 6 | ||
| 7 | -// Verifies there are no ungarded inlines | 7 | +// Verifies there are no unguarded inlines |
| 8 | TEST(Link, DoNothing) { | 8 | TEST(Link, DoNothing) { |
| 9 | int a = do_nothing(); | 9 | int a = do_nothing(); |
| 10 | EXPECT_EQ(7, a); | 10 | EXPECT_EQ(7, a); |