#include #include using namespace detail; TEST(Format, positive_int) { constexpr std::array control1 = {'0', '0', '0', '0', '0', '0', '0', '2'}; constexpr std::array formatted1 = format<"{:08}">(2); constexpr std::array control2 = {' ', ' ', ' ', '2', '2', '2', '2', '2'}; constexpr std::array formatted2 = format<"{:8}">(22222); constexpr std::array control3 = {'0', '0', '0', '1', '2', '3', '4', '5'}; constexpr std::array formatted3 = format<"{:08.4}">(12345); constexpr std::array control4 = {'6', '7', '8', '9'}; constexpr std::array formatted4 = format<"{:4}">(6789); EXPECT_EQ(control1, formatted1); EXPECT_EQ(control2, formatted2); EXPECT_EQ(control3, formatted3); EXPECT_EQ(control4, formatted4); } //TEST(Format, negative_int) { // // TODO // EXPECT_EQ(true, false); //} // //TEST(Format, positive_float) { // // TODO // EXPECT_EQ(true, false); //} // //TEST(Format, negative_float) { // // TODO // EXPECT_EQ(true, false); //} // //TEST(Format, string) { // // TODO // EXPECT_EQ(true, false); //}