Skip to content
Snippets Groups Projects
Commit 06256027 authored by Danilo Piparo's avatar Danilo Piparo
Browse files

[DF][ROOT-9724] Add test

parent 7d6d1f69
No related branches found
No related tags found
No related merge requests found
...@@ -875,6 +875,23 @@ TEST(RDFSimpleTests, SumOfStrings) ...@@ -875,6 +875,23 @@ TEST(RDFSimpleTests, SumOfStrings)
EXPECT_EQ(*df.Sum<std::string>("str"), "blabla"); EXPECT_EQ(*df.Sum<std::string>("str"), "blabla");
} }
TEST(RDFSimpleTests, AutomaticNamesOfHisto1DAndGraph)
{
auto df = RDataFrame(1).Define("x", [](){return 1;})
.Define("y", [](){return 1;});
auto hx = df.Histo1D("x");
auto hxy = df.Histo1D("x", "y");
auto gxy = df.Graph("x", "y");
EXPECT_STREQ(hx->GetName(), "x");
EXPECT_STREQ(hx->GetTitle(), "x");
EXPECT_STREQ(hxy->GetName(), "x_y");
EXPECT_STREQ(hxy->GetTitle(), "x_y");
EXPECT_STREQ(gxy->GetName(), "x_y");
EXPECT_STREQ(gxy->GetTitle(), "x_y");
}
// run single-thread tests // run single-thread tests
INSTANTIATE_TEST_CASE_P(Seq, RDFSimpleTests, ::testing::Values(false)); INSTANTIATE_TEST_CASE_P(Seq, RDFSimpleTests, ::testing::Values(false));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment