Electroneum
Loading...
Searching...
No Matches
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
TEST
#define TEST(test_case_name, test_name)
Definition
gtest.h:2187
EXPECT_FALSE
#define EXPECT_FALSE(condition)
Definition
gtest.h:1862
tools::is_hdd
boost::optional< bool > is_hdd(const char *file_path)
Definition
util.cpp:813
util.h
tests
unit_tests
is_hdd.cpp
Generated on
for Electroneum by
1.16.1