1
0
Files
YYCCommonplace/test/yycc/macro/endian_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

19 lines
423 B
C++

#include <gtest/gtest.h>
#include <yycc.hpp>
#include <yycc/macro/endian_detector.hpp>
#define ENDIAN ::yycc::macro::endian
namespace yycctest::macro::endian {
TEST(MacroEndian, Main) {
auto rv = ENDIAN::get_endian();
#if defined(YYCC_ENDIAN_LITTLE)
EXPECT_EQ(rv, ENDIAN::EndianKind::Little);
#else
EXPECT_EQ(rv, ENDIAN::EndianKind::Big);
#endif
}
} // namespace yycctest::macro::endian