Added visual studio cmake support

This commit is contained in:
Dmitriy Shishkov 2021-12-16 01:45:16 +03:00
parent c428d66983
commit ad84a6149f
No known key found for this signature in database
GPG Key ID: 14358F96FCDD8060
3 changed files with 18 additions and 2 deletions

View File

@ -7,4 +7,4 @@ enable_testing()
add_subdirectory(Demo)
add_subdirectory(QRCodeLibrary)
add_subdirectory(tests)
add_subdirectory(tests)

16
CMakeSettings.json Normal file
View File

@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"cmakeToolchain": "C:/Users/dm1sh/Downloads/vcpkg/scripts/buildsystems/vcpkg.cmake"
}
]
}

View File

@ -14,7 +14,7 @@ TEST(QRCodeTests, ConstructsClass) {
string inp("TEST");
QRCode qr(inp);
EXPECT_EQ(qr.input, "TES");
EXPECT_EQ(qr.input, "TEST");
EXPECT_EQ(qr.corr_lvl, CorrectionLevel::M);
EXPECT_EQ(qr.method, QRCodeMethod::Alphabetic);
}