message: tests: add unit test for data section without memory
diff: @@ -1243,10 +1243,23 @@ TEST(parser, data_section_memidx_nonzero)
  {
  const auto section_contents = make_vec({"0141010b0100"_bytes});
  const auto bin = bytes{wasm_prefix} + make_section(11, section_contents);
  -
  EXPECT_THROW_MESSAGE(parse(bin), parser_error, "unexpected memidx value 1");
  }
  +TEST(parser, data_section_empty_vector_without_memory)
  +{
  + const auto bin = bytes{wasm_prefix} + make_section(11, make_vec({"0041010b00"_bytes}));
  + EXPECT_THROW_MESSAGE(
  + parse(bin), validation_error, "data section encountered without a memory section");
  +}
  +
  +TEST(parser, data_section_without_memory)
  +{
  + const auto bin = bytes{wasm_prefix} + make_section(11, make_vec({"0041010b02aaff"_bytes}));
  + EXPECT_THROW_MESSAGE(
  + parse(bin), validation_error, "data section encountered without a memory section");
  +}
  +
  TEST(parser, data_section_out_of_bounds)
  {
  const auto wasm1 = bytes{wasm_prefix} + make_section(11, make_vec({"0041000b01"_bytes}));
  