15 lines
371 B
C++
15 lines
371 B
C++
#include "print_and_format.hpp"
|
|
#include <gtest/gtest.h>
|
|
|
|
TEST(PrintAndFormat, FormatGreeting) {
|
|
EXPECT_EQ(cpp23::format_greeting("Ada", 100), "Ada scored 100 points");
|
|
}
|
|
|
|
TEST(PrintAndFormat, FormatTableRow) {
|
|
EXPECT_EQ(cpp23::format_table_row({"A", "B", "C"}), "A | B | C");
|
|
}
|
|
|
|
TEST(PrintAndFormat, FormatHex) {
|
|
EXPECT_EQ(cpp23::format_hex(255), "0xFF");
|
|
}
|