mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
is_hdd update
This commit is contained in:
parent
91c7d68b2d
commit
9d6539923e
5 changed files with 61 additions and 53 deletions
|
@ -76,7 +76,8 @@ set(unit_tests_sources
|
|||
output_selection.cpp
|
||||
vercmp.cpp
|
||||
ringdb.cpp
|
||||
wipeable_string.cpp)
|
||||
wipeable_string.cpp
|
||||
is_hdd.cpp)
|
||||
|
||||
set(unit_tests_headers
|
||||
unit_tests_utils.h)
|
||||
|
|
17
tests/unit_tests/is_hdd.cpp
Normal file
17
tests/unit_tests/is_hdd.cpp
Normal file
|
@ -0,0 +1,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()));
|
||||
}
|
||||
#else
|
||||
TEST(is_hdd, unknown_os)
|
||||
{
|
||||
std::string path = "";
|
||||
EXPECT_FALSE(tools::is_hdd(path.c_str()));
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue