Commit 16450630 authored by Bart van der Velden's avatar Bart van der Velden

Fixed unit tests on Linux (#65)

parent 44c2cbc1
......@@ -100,6 +100,7 @@ find_package(Boost 1.55 COMPONENTS system filesystem thread program_options chro
if(Boost_FOUND)
message(STATUS "Found Boost")
add_definitions(-DBOOST_SYSTEM_NO_DEPRECATED)
add_definitions(-DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_ALL_DYN_LINK)
add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
include_directories(${Boost_INCLUDE_DIRS})
......
......@@ -23,19 +23,31 @@ TEST(UtilsTest, PrepareLongFileNameWithDrive)
TEST(UtilsTest, PrepareLongFileNameNoDrive1)
{
fs::path res = PrepareLongFileName("relative\\path");
#if defined(_WIN32)
EXPECT_STREQ(L"relative\\path", res.c_str());
#else
EXPECT_STREQ("relative\\path", res.c_str());
#endif
}
TEST(UtilsTest, PrepareLongFileNameNoDrive2)
{
fs::path res = PrepareLongFileName("a");
#if defined(_WIN32)
EXPECT_STREQ(L"a", res.c_str());
#else
EXPECT_STREQ("a", res.c_str());
#endif
}
TEST(UtilsTest, PrepareLongFileNameNoDrive3)
{
fs::path res = PrepareLongFileName("a:b");
#if defined(_WIN32)
EXPECT_STREQ(L"a:b", res.c_str());
#else
EXPECT_STREQ("a:b", res.c_str());
#endif
}
TEST(UtilsTest, PrepareLongFileNameNonAnsiCharacters)
......
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