mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-29 20:23:55 +00:00
Adding windows test
This commit is contained in:
parent
8961df0e8b
commit
f6e1b8d7aa
@ -33,6 +33,10 @@ set(CLI11_TESTS
|
|||||||
DeprecatedTest
|
DeprecatedTest
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
list(APPEND CLI11_TESTS WindowsTest)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CLI11_MULTIONLY_TESTS
|
set(CLI11_MULTIONLY_TESTS
|
||||||
TimerTest
|
TimerTest
|
||||||
)
|
)
|
||||||
|
13
tests/WindowsTest.cpp
Normal file
13
tests/WindowsTest.cpp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include "app_helper.hpp"
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
|
// This test verifies that CLI11 still works if
|
||||||
|
// Windows.h is included. #145
|
||||||
|
|
||||||
|
TEST_F(TApp, WindowsTestSimple) {
|
||||||
|
app.add_flag("-c,--count");
|
||||||
|
args = {"-c"};
|
||||||
|
run();
|
||||||
|
EXPECT_EQ((size_t)1, app.count("-c"));
|
||||||
|
EXPECT_EQ((size_t)1, app.count("--count"));
|
||||||
|
}
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
int do_nothing();
|
int do_nothing();
|
||||||
|
|
||||||
// Verifies there are no ungarded inlines
|
// Verifies there are no unguarded inlines
|
||||||
TEST(Link, DoNothing) {
|
TEST(Link, DoNothing) {
|
||||||
int a = do_nothing();
|
int a = do_nothing();
|
||||||
EXPECT_EQ(7, a);
|
EXPECT_EQ(7, a);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user