From cb112a452985d019502fecb8ad657d7559e0db94 Mon Sep 17 00:00:00 2001 From: Enrico Guiraud <enrico.guiraud@cern.ch> Date: Mon, 19 Apr 2021 15:07:35 +0200 Subject: [PATCH] [DF] Add test for ROOT-9558 --- tree/dataframe/test/dataframe_interface.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tree/dataframe/test/dataframe_interface.cxx b/tree/dataframe/test/dataframe_interface.cxx index 035fa6bf7fc..ca88a4b8423 100644 --- a/tree/dataframe/test/dataframe_interface.cxx +++ b/tree/dataframe/test/dataframe_interface.cxx @@ -617,3 +617,15 @@ TEST(RDataFrameInterface, Describe) "myFloat Float_t Dataset"; EXPECT_EQ(df3.Describe(), ref2); } + +// https://sft.its.cern.ch/jira/browse/ROOT-9558 +TEST(RDFSimpleTests, LeafWithDifferentNameThanBranch) +{ + TTree t("t", "t"); + int x = 42; + t.Branch("x", &x, "y/I"); + t.Fill(); + + auto m = ROOT::RDataFrame(t).Max<int>("x"); + EXPECT_EQ(*m, 42); +} -- GitLab