1
0
Files
YYCCommonplace/test/yycc/macro/os_detector.cpp
yyc12345 e7a05b3488 refactor: rename testbench to test.
- rename testbench to test.
- add benchmark for future development.
2025-09-29 13:34:02 +08:00

21 lines
446 B
C++

#include <gtest/gtest.h>
#include <yycc.hpp>
#include <yycc/macro/os_detector.hpp>
#define OS ::yycc::macro::os
namespace yycctest::macro::os {
TEST(MacroOs, Main) {
auto rv = OS::get_os();
#if defined(YYCC_OS_WINDOWS)
EXPECT_EQ(rv, OS::OsKind::Windows);
#elif defined(YYCC_OS_LINUX)
EXPECT_EQ(rv, OS::OsKind::Linux);
#else
EXPECT_EQ(rv, OS::OsKind::MacOs);
#endif
}
} // namespace yycctest::macro::os