mirror of
https://github.com/monero-project/monero.git
synced 2025-12-25 12:25:18 -08:00
is_hdd update
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user