Electroneum
is_hdd.cpp
Go to the documentation of this file.
1
#include "
common/util.h
"
2
#include <string>
3
#include <gtest/gtest.h>
4
5
#if defined(__GLIBC__)
6
TEST
(
is_hdd
, linux_os_root)
7
{
8
std::string
path =
"/"
;
9
EXPECT_TRUE
(
tools::is_hdd
(path.c_str()) != boost::none);
10
}
11
#else
12
TEST
(
is_hdd
, unknown_os)
13
{
14
std::string
path =
""
;
15
EXPECT_FALSE
(
tools::is_hdd
(path.c_str()) != boost::none);
16
}
17
#endif
EXPECT_TRUE
#define EXPECT_TRUE(condition)
Definition:
gtest.h:1859
testing::internal::string
::std::string string
Definition:
gtest-port.h:1097
TEST
TEST(is_hdd, unknown_os)
Definition:
is_hdd.cpp:12
EXPECT_FALSE
#define EXPECT_FALSE(condition)
Definition:
gtest.h:1862
util.h
tools::is_hdd
boost::optional< bool > is_hdd(const char *file_path)
Definition:
util.cpp:813
tests
unit_tests
is_hdd.cpp
Generated on Sun Mar 10 2024 12:00:00 for Electroneum by
1.8.14