diff --git a/tree/dataframe/test/dataframe_display.cxx b/tree/dataframe/test/dataframe_display.cxx index 2018b10e25daa..88e22b0d8e0a4 100644 --- a/tree/dataframe/test/dataframe_display.cxx +++ b/tree/dataframe/test/dataframe_display.cxx @@ -9,56 +9,54 @@ using namespace ROOT; using namespace ROOT::RDF; using namespace ROOT::VecOps; -static const std::string DisplayPrintDefaultRows("+-----+----+----+-----------+\n" - "| Row | b1 | b2 | b3 | \n" - "+-----+----+----+-----------+\n" - "| 0 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 1 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 2 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 3 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 4 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" -); - -static const std::string DisplayAsStringDefaultRows("+-----+----+----+-----------+\n" - "| Row | b1 | b2 | b3 | \n" - "+-----+----+----+-----------+\n" - "| 0 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 1 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 2 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 3 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 4 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "| | | | | \n" - "+-----+----+----+-----------+\n" -); +static const std::string DisplayPrintDefaultRows("+-----+----+----+----------+\n" + "| Row | b1 | b2 | b3 | \n" + "+-----+----+----+----------+\n" + "| 0 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 1 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 2 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 3 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 4 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n"); + +static const std::string DisplayAsStringDefaultRows("+-----+----+----+----------+\n" + "| Row | b1 | b2 | b3 | \n" + "+-----+----+----+----------+\n" + "| 0 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 1 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 2 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 3 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 4 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "| | | | | \n" + "+-----+----+----+----------+\n"); TEST(RDFDisplayTests, DisplayNoJitDefaultRows) { @@ -141,30 +139,30 @@ TEST(RDFDisplayTests, DisplayRegexDefaultRows) EXPECT_EQ(dd->AsString(), DisplayAsStringDefaultRows); } -static const std::string DisplayPrintTwoRows("+-----+----+----+-----------+\n" - "| Row | b1 | b2 | b3 | \n" - "+-----+----+----+-----------+\n" - "| 0 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 1 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n"); - -static const std::string DisplayAsStringTwoRows("+-----+----+----+-----------+\n" - "| Row | b1 | b2 | b3 | \n" - "+-----+----+----+-----------+\n" - "| 0 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "+-----+----+----+-----------+\n" - "| 1 | 0 | 1 | 2.0000000 | \n" - "| | | 2 | | \n" - "| | | 3 | | \n" - "| | | | | \n" - "+-----+----+----+-----------+\n"); +static const std::string DisplayPrintTwoRows("+-----+----+----+----------+\n" + "| Row | b1 | b2 | b3 | \n" + "+-----+----+----+----------+\n" + "| 0 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 1 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n"); + +static const std::string DisplayAsStringTwoRows("+-----+----+----+----------+\n" + "| Row | b1 | b2 | b3 | \n" + "+-----+----+----+----------+\n" + "| 0 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "+-----+----+----+----------+\n" + "| 1 | 0 | 1 | 2.000000 | \n" + "| | | 2 | | \n" + "| | | 3 | | \n" + "| | | | | \n" + "+-----+----+----+----------+\n"); TEST(RDFDisplayTests, DisplayJitTwoRows) { diff --git a/tree/dataframe/test/datasource_csv.cxx b/tree/dataframe/test/datasource_csv.cxx index 11d528a2a991e..8aa008d008670 100644 --- a/tree/dataframe/test/datasource_csv.cxx +++ b/tree/dataframe/test/datasource_csv.cxx @@ -390,34 +390,34 @@ TEST(RCsvDS, NanWarningChecks) ROOT_EXPECT_WARNING(d->AsString(), "RCsvDS", Warn); - const std::string AsString = "+-----+------------+-------+------+----------------+\n" - "| Row | col1 | col3 | col6 | col8 | \n" - "+-----+------------+-------+------+----------------+\n" - "| 0 | 3.1400000 | false | 0 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 1 | 4.1400000 | false | 2 | \"R,Data,Frame\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 2 | nan | true | 3 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 3 | 5.1400000 | true | 4 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 4 | -6.1400000 | true | 5 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 5 | -7.1400000 | true | 6 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 6 | nan | true | 7 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 7 | nan | true | 8 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 8 | 3.1500000 | true | 9 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 9 | 5.1500000 | true | 10 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 10 | 6.1500000 | true | 11 | \"nan\" | \n" - "+-----+------------+-------+------+----------------+\n" - "| 11 | 6.1500000 | true | 12 | \"nan\" | \n" - "| | | | | | \n" - "+-----+------------+-------+------+----------------+\n"; + const std::string AsString = "+-----+-----------+-------+------+----------------+\n" + "| Row | col1 | col3 | col6 | col8 | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 0 | 3.140000 | false | 0 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 1 | 4.140000 | false | 2 | \"R,Data,Frame\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 2 | nan | true | 3 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 3 | 5.140000 | true | 4 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 4 | -6.140000 | true | 5 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 5 | -7.140000 | true | 6 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 6 | nan | true | 7 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 7 | nan | true | 8 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 8 | 3.150000 | true | 9 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 9 | 5.150000 | true | 10 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 10 | 6.150000 | true | 11 | \"nan\" | \n" + "+-----+-----------+-------+------+----------------+\n" + "| 11 | 6.150000 | true | 12 | \"nan\" | \n" + "| | | | | | \n" + "+-----+-----------+-------+------+----------------+\n"; EXPECT_EQ(d->AsString(), AsString); }