@@ -32,6 +32,12 @@ TEST(RNTupleEmulated, EmulatedFields_Simple)
3232 auto model = RNTupleModel::Create ();
3333 model->AddField (RFieldBase::Create (" f" , " Outer_Simple" ).Unwrap ());
3434
35+ // TStreamerInfo::Build will report a warning for interpreted classes (but only for members).
36+ // See also https://github.com/root-project/root/issues/9371
37+ ROOT::TestSupport::CheckDiagsRAII diagRAII;
38+ diagRAII.optionalDiag (kWarning , " TStreamerInfo::Build" , " has no streamer or dictionary" ,
39+ /* matchFullMessage=*/ false );
40+
3541 auto writer = RNTupleWriter::Recreate (std::move (model), " ntpl" , fileGuard.GetPath ());
3642 writer->Fill ();
3743
@@ -42,13 +48,6 @@ TEST(RNTupleEmulated, EmulatedFields_Simple)
4248 ProcessLine (" ptrOuter->fInner.fInt2 = 82;" );
4349 ProcessLine (" ptrOuter->fInt1 = 93;" );
4450 writer->Fill ();
45-
46- // TStreamerInfo::Build will report a warning for interpreted classes (but only for members).
47- // See also https://github.com/root-project/root/issues/9371
48- ROOT::TestSupport::CheckDiagsRAII diagRAII;
49- diagRAII.optionalDiag (kWarning , " TStreamerInfo::Build" , " has no streamer or dictionary" ,
50- /* matchFullMessage=*/ false );
51- writer.reset ();
5251 });
5352
5453 auto reader = RNTupleReader::Open (" ntpl" , fileGuard.GetPath ());
@@ -145,6 +144,12 @@ TEST(RNTupleEmulated, EmulatedFields_Vecs)
145144 auto model = RNTupleModel::Create ();
146145 model->AddField (RFieldBase::Create (" outers" , " std::vector<Outer_Vecs>" ).Unwrap ());
147146
147+ // TStreamerInfo::Build will report a warning for interpreted classes (but only for members).
148+ // See also https://github.com/root-project/root/issues/9371
149+ ROOT::TestSupport::CheckDiagsRAII diagRAII;
150+ diagRAII.optionalDiag (kWarning , " TStreamerInfo::Build" , " has no streamer or dictionary" ,
151+ /* matchFullMessage=*/ false );
152+
148153 auto writer = RNTupleWriter::Recreate (std::move (model), " ntpl" , fileGuard.GetPath ());
149154 writer->Fill ();
150155
@@ -155,13 +160,6 @@ TEST(RNTupleEmulated, EmulatedFields_Vecs)
155160 ProcessLine (" (*ptrOuters)[0].fInners.push_back(Inner_Vecs{42.f});" );
156161 ProcessLine (" (*ptrOuters)[0].fInner.fFlt = 84.f;" );
157162 writer->Fill ();
158-
159- // TStreamerInfo::Build will report a warning for interpreted classes (but only for members).
160- // See also https://github.com/root-project/root/issues/9371
161- ROOT::TestSupport::CheckDiagsRAII diagRAII;
162- diagRAII.optionalDiag (kWarning , " TStreamerInfo::Build" , " has no streamer or dictionary" ,
163- /* matchFullMessage=*/ false );
164- writer.reset ();
165163 });
166164
167165 auto reader = RNTupleReader::Open (" ntpl" , fileGuard.GetPath ());
@@ -318,15 +316,14 @@ TEST(RNTupleEmulated, EmulatedFields_EmptyStruct)
318316 auto model = RNTupleModel::Create ();
319317 model->AddField (RFieldBase::Create (" f" , " Outer_EmptyStruct" ).Unwrap ());
320318
321- auto writer = RNTupleWriter::Recreate (std::move (model), " ntpl" , fileGuard.GetPath ());
322- writer->Fill ();
323-
324319 // TStreamerInfo::Build will report a warning for interpreted classes (but only for members).
325320 // See also https://github.com/root-project/root/issues/9371
326321 ROOT::TestSupport::CheckDiagsRAII diagRAII;
327322 diagRAII.optionalDiag (kWarning , " TStreamerInfo::Build" , " has no streamer or dictionary" ,
328323 /* matchFullMessage=*/ false );
329- writer.reset ();
324+
325+ auto writer = RNTupleWriter::Recreate (std::move (model), " ntpl" , fileGuard.GetPath ());
326+ writer->Fill ();
330327 });
331328
332329 auto reader = RNTupleReader::Open (" ntpl" , fileGuard.GetPath ());
0 commit comments