2018-08-25 05:16:01 -06:00
|
|
|
#include "common/util.h"
|
|
|
|
#include <string>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
#if defined(__GLIBC__)
|
|
|
|
TEST(is_hdd, linux_os_root)
|
|
|
|
{
|
|
|
|
std::string path = "/";
|
2018-09-29 14:11:50 -06:00
|
|
|
EXPECT_TRUE(tools::is_hdd(path.c_str()) != boost::none);
|
2018-08-25 05:16:01 -06:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
TEST(is_hdd, unknown_os)
|
|
|
|
{
|
|
|
|
std::string path = "";
|
2018-09-29 14:11:50 -06:00
|
|
|
EXPECT_FALSE(tools::is_hdd(path.c_str()) != boost::none);
|
2018-08-25 05:16:01 -06:00
|
|
|
}
|
|
|
|
#endif
|