@@ -95,7 +95,10 @@ void test_new_parser_events_ints_from_yaml(ReferenceYaml const& yaml, std::strin
9595{
9696 extra::EventHandlerInts handler{};
9797 using IntType = extra::ievt::DataType;
98- std::vector<IntType> actual_evts (num_ints (yaml.expected_ints .data (), yaml.expected_ints .size ()));
98+ // NOTE! crashes in MIPS64 Debug c++20 (but not c++11) when size is 0:
99+ // std::vector<IntType> actual_evts(empty.size());
100+ std::vector<IntType> actual_evts; // DO THIS!
101+ size_t size_reference = num_ints (yaml.expected_ints .data (), yaml.expected_ints .size ());
99102 int size_estimated = extra::estimate_events_ints_size (to_csubstr (yaml.parsed ));
100103 // there was an error in gcc<5 where the copy buffer was NOT
101104 // assigned when using a std::string:
@@ -107,6 +110,10 @@ void test_new_parser_events_ints_from_yaml(ReferenceYaml const& yaml, std::strin
107110 ParseEngine<extra::EventHandlerInts> parser (&handler);
108111 parser.parse_in_place_ev (" (testyaml)" , to_substr (copy));
109112 EXPECT_GE (size_estimated, handler.required_size_events ());
113+ if (yaml.expected_ints_enabled )
114+ {
115+ EXPECT_EQ (size_reference, handler.required_size_events ());
116+ }
110117 size_t sz = (size_t )handler.required_size_events ();
111118 if (!handler.fits_buffers ())
112119 {
@@ -145,7 +152,7 @@ void test_new_parser_events_ints_from_yaml(ReferenceYaml const& yaml, std::strin
145152 /* ignore_container_style*/ false ,
146153 /* ignore_scalar_style*/ false ,
147154 /* ignore_tag_normalization*/ true );
148- }
155+ }
149156}
150157
151158void test_new_parser_tree_from_yaml (ReferenceYaml const & yaml)
0 commit comments