Skip to content

Commit bb86981

Browse files
committed
[ntuple] Add named processor tests
1 parent ad44658 commit bb86981

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

tree/ntuple/v7/test/ntuple_processor.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ TEST_F(RNTupleProcessorTest, BaseWithBareModel)
115115

116116
auto proc = RNTupleProcessor::Create(ntuple, std::move(model));
117117

118+
EXPECT_STREQ("ntuple", proc->GetProcessorName().c_str());
119+
120+
{
121+
auto namedProc = RNTupleProcessor::Create(ntuple, "my_ntuple");
122+
EXPECT_STREQ("my_ntuple", namedProc->GetProcessorName().c_str());
123+
}
124+
118125
int nEntries = 0;
119126

120127
for (const auto &entry : *proc) {

tree/ntuple/v7/test/ntuple_processor_chain.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ TEST_F(RNTupleChainProcessorTest, Basic)
103103

104104
std::uint64_t nEntries = 0;
105105
auto proc = RNTupleProcessor::CreateChain(ntuples);
106+
107+
EXPECT_STREQ("ntuple", proc->GetProcessorName().c_str());
108+
109+
{
110+
auto namedProc = RNTupleProcessor::CreateChain(ntuples, "my_ntuple");
111+
EXPECT_STREQ("my_ntuple", namedProc->GetProcessorName().c_str());
112+
}
113+
106114
auto x = proc->GetEntry().GetPtr<float>("x");
107115
for (const auto &entry : *proc) {
108116
EXPECT_EQ(++nEntries, proc->GetNEntriesProcessed());

tree/ntuple/v7/test/ntuple_processor_join.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ TEST_F(RNTupleJoinProcessorTest, Basic)
9494
ntuples = {{fNTupleNames[0], fFileNames[0]}};
9595

9696
auto proc = RNTupleProcessor::CreateJoin(ntuples, {});
97+
EXPECT_STREQ("ntuple1", proc->GetProcessorName().c_str());
98+
99+
{
100+
auto namedProc = RNTupleProcessor::CreateJoin(ntuples, {}, "my_ntuple");
101+
EXPECT_STREQ("my_ntuple", namedProc->GetProcessorName().c_str());
102+
}
97103

98104
int nEntries = 0;
99105
for (const auto &entry : *proc) {

0 commit comments

Comments
 (0)