We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bab28c6 + 48395b2 commit d5da5b0Copy full SHA for d5da5b0
1 file changed
openvdb/openvdb/unittest/TestFile.cc
@@ -776,6 +776,11 @@ TEST_F(TestFile, testGridNaming)
776
file.write(gridVec);
777
}
778
779
+ // Redirect stderr to suppress expected warnings about duplicate grid names
780
+ std::streambuf* orig_cerr = std::cerr.rdbuf();
781
+ std::ostringstream null_stream;
782
+ std::cerr.rdbuf(null_stream.rdbuf());
783
+
784
// Open the file for reading.
785
File file(filename);
786
file.setInstancingEnabled(instancing);
@@ -809,6 +814,9 @@ TEST_F(TestFile, testGridNaming)
809
814
EXPECT_EQ((n < 0 ? 0 : n), grid->metaValue<openvdb::Int32>("index"));
810
815
811
816
817
+ // Restore stderr
818
+ std::cerr.rdbuf(orig_cerr);
819
812
820
// Read all three grids at once.
813
821
GridPtrVecPtr allGrids = file.getGrids();
822
EXPECT_TRUE(allGrids.get() != nullptr);
0 commit comments