Commit 1b54afa7 authored by Bart van der Velden's avatar Bart van der Velden

Fixed build on Linux by linking to boost program_options for the unit test

Also removed two compiler warnings that appeared on Linux (#53)
parent 4a7e5531
......@@ -47,9 +47,11 @@ if(test)
${INCLUDES}
${gtest_SOURCE_DIR}/src/gtest_main.cc)
target_link_libraries(runMusicCollectionTest gtest ${TAGLIB_LIBRARIES})
target_link_libraries(runMusicCollectionTest gtest
${TAGLIB_LIBRARIES}
${Boost_LIBRARIES})
qt5_use_modules(runMusicCollectionTest Core)
add_test(NAME MusicCollectionTest COMMAND runMusicCollectionTest)
endif()
\ No newline at end of file
endif()
......@@ -9,8 +9,8 @@ TEST(HandleCommandLineTest, EmptyPath)
vector<fs::path> directories;
fs::path logfile;
string message;
auto result = HandleCommandLine(0, 0, directories, logfile, message);
EXPECT_EQ(false, result);
bool result = HandleCommandLine(0, 0, directories, logfile, message);
EXPECT_FALSE(result);
}
TEST(HandleCommandLineTest, OneArg)
......@@ -19,8 +19,8 @@ TEST(HandleCommandLineTest, OneArg)
fs::path logfile;
string message;
vector<char*> args;
args.push_back("--directory");
args.push_back("c:\temp");
auto result = HandleCommandLine(2, &args[0], directories, logfile, message);
EXPECT_EQ(false, result);
args.push_back((char*)"--directory");
args.push_back((char*)"c:\temp");
bool result = HandleCommandLine(2, &args[0], directories, logfile, message);
EXPECT_FALSE(result);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment