mirror of
https://github.com/fmtlib/fmt.git
synced 2026-06-15 08:26:13 +08:00
12 lines
286 B
C++
12 lines
286 B
C++
// ... (existing tests)
|
|
#ifdef __STDCPP_FLOAT16_T__
|
|
TEST(StdTest, ComplexFloat16) {
|
|
std::complex<std::float16_t> c(1.0f16, 2.0f16);
|
|
EXPECT_EQ(fmt::format("{}", c), "(1, 2)");
|
|
}
|
|
|
|
TEST(StdTest, Float16) {
|
|
std::float16_t f = 1.5f16;
|
|
EXPECT_EQ(fmt::format("{}", f), "1.5");
|
|
}
|
|
#endif |