Skip to content

Commit c1a8a4b

Browse files
committed
Fix table tests with changed default
1 parent 987c47f commit c1a8a4b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

palace/utils/tablecsv.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class Table
208208
auto to = [&buf](auto f, auto &&...a)
209209
{ fmt::format_to(std::back_inserter(buf), f, std::forward<decltype(a)>(a)...); };
210210

211-
for (int i = 0; i < n_cols(); i++)
211+
for (size_t i = 0; i < n_cols(); i++)
212212
{
213213
if (i > 0)
214214
{
@@ -225,7 +225,7 @@ class Table
225225
auto to = [&buf](auto f, auto &&...a)
226226
{ fmt::format_to(std::back_inserter(buf), f, std::forward<decltype(a)>(a)...); };
227227

228-
for (int i = 0; i < n_cols(); i++)
228+
for (size_t i = 0; i < n_cols(); i++)
229229
{
230230
if (i > 0)
231231
{
@@ -254,7 +254,7 @@ class Table
254254
{
255255
fmt::memory_buffer buf{};
256256
append_header(buf);
257-
for (int j = 0; j < n_rows(); j++)
257+
for (size_t j = 0; j < n_rows(); j++)
258258
{
259259
append_row(buf, j);
260260
}

test/unit/test-tablecsv.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ TEST_CASE("TableCSV", "[tablecsv]")
7474

7575
// clang-format off
7676
auto table_str1 = std::string(
77-
" Header Col 1, Header Col 2, Header Col 3\n"
78-
" NULL, +2.000000000e+00, +3.000000000e+00\n"
79-
" NULL, NULL, +6.000000000e+00\n"
77+
" Header Col 1, Header Col 2, Header Col 3\n"
78+
" NULL, +2.000000000e+00, +3.000000000e+00\n"
79+
" NULL, NULL, +6.000000000e+00\n"
8080
);
8181
// clang-format on
8282
CHECK(table.format_table() == table_str1);
@@ -87,9 +87,9 @@ TEST_CASE("TableCSV", "[tablecsv]")
8787

8888
// clang-format off
8989
auto table_str2 = std::string(
90-
" Header Col 1, Header Col 2, Header Col 3\n"
91-
" NULL, +2.000000e+00, +3.000000000e+00\n"
92-
" NULL, NULL, +6.000000000e+00\n"
90+
" Header Col 1, Header Col 2, Header Col 3\n"
91+
" NULL, +2.000000e+00, +3.000000000e+00\n"
92+
" NULL, NULL, +6.000000000e+00\n"
9393
);
9494
// clang-format on
9595
CHECK(table.format_table() == table_str2);
@@ -101,9 +101,9 @@ TEST_CASE("TableCSV", "[tablecsv]")
101101

102102
// clang-format off
103103
auto table_str3 = std::string(
104-
" Header Col 1,Header Col 2, Header Col 3\n"
105-
" NULL, 2.00e+00, +3.000000000e+00\n"
106-
" NULL, NULL, +6.000000000e+00\n"
104+
" Header Col 1,Header Col 2, Header Col 3\n"
105+
" NULL, 2.00e+00, +3.000000000e+00\n"
106+
" NULL, NULL, +6.000000000e+00\n"
107107
);
108108
// clang-format on
109109
CHECK(table.format_table() == table_str3);

0 commit comments

Comments
 (0)