diff --git a/tests/bb_tests_cpp/test_table_basic.cpp b/tests/bb_tests_cpp/test_table_basic.cpp index e45cae4..8ceaa9f 100644 --- a/tests/bb_tests_cpp/test_table_basic.cpp +++ b/tests/bb_tests_cpp/test_table_basic.cpp @@ -2,16 +2,6 @@ #include "fort.hpp" #include "test_utils.hpp" -namespace fort -{ -// Write custom specialisation for testing purposes. -using setw_type = typename std::decay::type; -template <> -constexpr bool is_stream_manipulator() noexcept -{ - return false; -} -} void test_cpp_bug_fixes(void) { @@ -110,36 +100,21 @@ void test_cpp_bug_fixes(void) SCENARIO("Issue 49 - https://github.com/seleznevae/libfort/issues/49") { - { - fort::char_table table; - table << std::setprecision(5) << 3.14 << std::hex << 256 << fort::endr - << std::fixed << std::setprecision(2) << 11.1234567; - std::string table_str = table.to_string(); - std::string table_str_etalon = - "+-------+-----+\n" - "| | |\n" - "| 3.14 | 100 |\n" - "| | |\n" - "+-------+-----+\n" - "| | |\n" - "| 11.12 | |\n" - "| | |\n" - "+-------+-----+\n"; - assert_string_equal(table_str, table_str_etalon); - } - - { - fort::char_table table; - table << std::setw(15) << 3.14000001; - std::string table_str = table.to_string(); - std::string table_str_etalon = - "+--+-----------------+\n" - "| | |\n" - "| | 3.14 |\n" - "| | |\n" - "+--+-----------------+\n"; - assert_string_equal(table_str, table_str_etalon); - } + fort::char_table table; + table << std::setprecision(5) << 3.14 << std::hex << 256 << fort::endr + << std::fixed << std::setprecision(2) << 11.1234567; + std::string table_str = table.to_string(); + std::string table_str_etalon = + "+-------+-----+\n" + "| | |\n" + "| 3.14 | 100 |\n" + "| | |\n" + "+-------+-----+\n" + "| | |\n" + "| 11.12 | |\n" + "| | |\n" + "+-------+-----+\n"; + assert_string_equal(table_str, table_str_etalon); } }