1 // Formatting library for C++ - formatting library tests 2 // 3 // Copyright (c) 2012 - present, Victor Zverovich 4 // All rights reserved. 5 // 6 // For the license information refer to format.h. 7 8 #include "gtest/gtest.h" 9 10 #if !defined(__GNUC__) || __GNUC__ >= 5 11 #define FMT_BUILTIN_TYPES 0 12 #include "fmt/format.h" 13 TEST(no_builtin_types_test,format)14TEST(no_builtin_types_test, format) { 15 EXPECT_EQ(fmt::format("{}", 42), "42"); 16 } 17 TEST(no_builtin_types_test,double_is_custom_type)18TEST(no_builtin_types_test, double_is_custom_type) { 19 double d = 42; 20 auto args = fmt::make_format_args(d); 21 EXPECT_EQ(fmt::format_args(args).get(0).type(), 22 fmt::detail::type::custom_type); 23 } 24 #endif 25