Lines Matching full:table

29 #include "utils/text/table.hpp"
46 /// Because of the flattening of the formatted table into a string, we risk
48 /// a table. This should not happen, and not accounting for this little detail
51 /// \param expected Textual representation of the table, as a collection of
54 /// \param table The table to format.
58 const text::table& table) in table_formatter_check() argument
60 ATF_REQUIRE_EQ(expected, text::join(formatter.format(table), "\n") + "\n"); in table_formatter_check()
68 ATF_REQUIRE_EQ(5, text::table(5).ncolumns()); in ATF_TEST_CASE_BODY()
69 ATF_REQUIRE_EQ(10, text::table(10).ncolumns()); in ATF_TEST_CASE_BODY()
83 text::table table(2); in ATF_TEST_CASE_BODY() local
84 table.add_row(row1); in ATF_TEST_CASE_BODY()
85 table.add_row(row2); in ATF_TEST_CASE_BODY()
87 ATF_REQUIRE_EQ(4, table.column_width(0)); in ATF_TEST_CASE_BODY()
88 ATF_REQUIRE_EQ(8, table.column_width(1)); in ATF_TEST_CASE_BODY()
102 text::table table(2); in ATF_TEST_CASE_BODY() local
103 table.add_row(row1); in ATF_TEST_CASE_BODY()
104 table.add_row(row2); in ATF_TEST_CASE_BODY()
106 ATF_REQUIRE_EQ(4, table.column_widths()[0]); in ATF_TEST_CASE_BODY()
107 ATF_REQUIRE_EQ(8, table.column_widths()[1]); in ATF_TEST_CASE_BODY()
114 text::table table(2); in ATF_TEST_CASE_BODY() local
115 ATF_REQUIRE(table.empty()); in ATF_TEST_CASE_BODY()
116 table.add_row(text::table_row(2)); in ATF_TEST_CASE_BODY()
117 ATF_REQUIRE(!table.empty()); in ATF_TEST_CASE_BODY()
129 text::table table(1); in ATF_TEST_CASE_BODY() local
130 table.add_row(row1); in ATF_TEST_CASE_BODY()
131 table.add_row(row2); in ATF_TEST_CASE_BODY()
133 text::table::const_iterator iter = table.begin(); in ATF_TEST_CASE_BODY()
134 ATF_REQUIRE(iter != table.end()); in ATF_TEST_CASE_BODY()
137 ATF_REQUIRE(iter != table.end()); in ATF_TEST_CASE_BODY()
140 ATF_REQUIRE(iter == table.end()); in ATF_TEST_CASE_BODY()
148 .format(text::table(1)).empty()); in ATF_TEST_CASE_BODY()
150 .format(text::table(10)).empty()); in ATF_TEST_CASE_BODY()
157 text::table table(3); in ATF_TEST_CASE_BODY() local
163 table.add_row(row); in ATF_TEST_CASE_BODY()
170 table.add_row(row); in ATF_TEST_CASE_BODY()
176 text::table_formatter(), table); in ATF_TEST_CASE_BODY()
183 text::table table(1); in ATF_TEST_CASE_BODY() local
187 table.add_row(row); in ATF_TEST_CASE_BODY()
192 table.add_row(row); in ATF_TEST_CASE_BODY()
198 text::table_formatter().set_separator(" | "), table); in ATF_TEST_CASE_BODY()
205 text::table table(1); in ATF_TEST_CASE_BODY() local
209 table.add_row(row); in ATF_TEST_CASE_BODY()
214 table.add_row(row); in ATF_TEST_CASE_BODY()
221 table); in ATF_TEST_CASE_BODY()
228 text::table table(1); in ATF_TEST_CASE_BODY() local
232 table.add_row(row); in ATF_TEST_CASE_BODY()
237 table.add_row(row); in ATF_TEST_CASE_BODY()
244 table); in ATF_TEST_CASE_BODY()
251 text::table table(3); in ATF_TEST_CASE_BODY() local
257 table.add_row(row); in ATF_TEST_CASE_BODY()
264 table.add_row(row); in ATF_TEST_CASE_BODY()
270 text::table_formatter().set_separator(" | "), table); in ATF_TEST_CASE_BODY()
277 text::table table(3); in ATF_TEST_CASE_BODY() local
283 table.add_row(row); in ATF_TEST_CASE_BODY()
290 table.add_row(row); in ATF_TEST_CASE_BODY()
297 .set_column_width(1, 28), table); in ATF_TEST_CASE_BODY()
304 text::table table(3); in ATF_TEST_CASE_BODY() local
310 table.add_row(row); in ATF_TEST_CASE_BODY()
317 table.add_row(row); in ATF_TEST_CASE_BODY()
327 .set_column_width(0, text::table_formatter::width_auto), table); in ATF_TEST_CASE_BODY()
336 .set_column_width(0, 23), table); in ATF_TEST_CASE_BODY()
343 text::table options_table(2); in ATF_TEST_CASE_BODY()
357 text::table commands_table(2); in ATF_TEST_CASE_BODY()