aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/is_hdd.cpp
blob: 040af4f47cc66496b4724ef1b6cb6a9063447899 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "common/util.h"
#include <string>
#include <gtest/gtest.h>

#if defined(__GLIBC__)
TEST(is_hdd, linux_os_root)
{
  std::string path = "/";
  EXPECT_TRUE(tools::is_hdd(path.c_str()) != boost::none);
}
#else
TEST(is_hdd, unknown_os)
{
  std::string path = "";
  EXPECT_FALSE(tools::is_hdd(path.c_str()) != boost::none);
}
#endif