Skip to content

Commit bd6ff15

Browse files
committed
[ntuple] Remove duplicate test
It was added as part of commit 263b12a ("automatically evolve fixed size array into RVec"), which also added a more appropriately named test ArrayAsRVec to ntuple_evolution_type.cxx that tests the same evolution. Since commit e4c6e2f ("test fixed-size array to vector evolution"), there is now another test named ArrayAsVector that uses the same test file name, which can lead to failures when executed at the same time.
1 parent b556baf commit bd6ff15

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

tree/ntuple/test/ntuple_evolution_shape.cxx

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -956,50 +956,6 @@ struct RenamedIntermediateDerived : public RenamedIntermediate2 {
956956
}
957957
}
958958

959-
TEST(RNTupleEvolution, ArrayAsVector)
960-
{
961-
FileRaii fileGuard("test_ntuple_evolution_array_as_vector.root");
962-
963-
ExecInFork([&] {
964-
// The child process writes the file and exits, but the file must be preserved to be read by the parent.
965-
fileGuard.PreserveFile();
966-
967-
ASSERT_TRUE(gInterpreter->Declare(R"(
968-
struct ArrayAsVector {
969-
std::array<int, 2> fArr = {1, 2};
970-
int x = 3;
971-
};
972-
)"));
973-
974-
auto model = RNTupleModel::Create();
975-
model->AddField(RFieldBase::Create("f", "ArrayAsVector").Unwrap());
976-
977-
auto writer = RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath());
978-
writer->Fill();
979-
980-
writer.reset();
981-
});
982-
983-
ASSERT_TRUE(gInterpreter->Declare(R"(
984-
struct ArrayAsVector {
985-
ROOT::RVec<short> fArr;
986-
int x;
987-
};
988-
)"));
989-
990-
auto reader = RNTupleReader::Open("ntpl", fileGuard.GetPath());
991-
ASSERT_EQ(1, reader->GetNEntries());
992-
993-
void *ptr = reader->GetModel().GetDefaultEntry().GetPtr<void>("f").get();
994-
DeclarePointer("ArrayAsVector", "ptrArrayAsVector", ptr);
995-
996-
reader->LoadEntry(0);
997-
EXPECT_EVALUATE_EQ("ptrArrayAsVector->x", 3);
998-
EXPECT_EVALUATE_EQ("ptrArrayAsVector->fArr.size()", 2);
999-
EXPECT_EVALUATE_EQ("ptrArrayAsVector->fArr[0]", 1);
1000-
EXPECT_EVALUATE_EQ("ptrArrayAsVector->fArr[1]", 2);
1001-
}
1002-
1003959
TEST(RNTupleEvolution, StreamerField)
1004960
{
1005961
FileRaii fileGuard("test_ntuple_evolution_streamer_field.root");

0 commit comments

Comments
 (0)