From 5785784c8a7ab6ca380266e58ef327b13b6f46f2 Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Thu, 2 Feb 2023 15:57:55 -0800 Subject: [PATCH] proto_test.cpp don't warn about gaps --- tests/proto_test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/proto_test.cpp b/tests/proto_test.cpp index 1cef9960a..b9fd10b07 100644 --- a/tests/proto_test.cpp +++ b/tests/proto_test.cpp @@ -43,6 +43,7 @@ void proto_test(const std::string &proto_path, const std::string &proto_file) { flatbuffers::IDLOptions opts; opts.include_dependence_headers = false; opts.proto_mode = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; // load the .proto and the golden file from disk std::string golden_file; @@ -59,6 +60,7 @@ void proto_test_id(const std::string &proto_path, opts.include_dependence_headers = false; opts.proto_mode = true; opts.keep_proto_id = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; // load the .proto and the golden file from disk std::string golden_file; @@ -76,6 +78,7 @@ void proto_test_union(const std::string &proto_path, opts.include_dependence_headers = false; opts.proto_mode = true; opts.proto_oneof_union = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; std::string golden_file; TEST_EQ(flatbuffers::LoadFile((proto_path + "test_union.golden.fbs").c_str(), @@ -92,6 +95,7 @@ void proto_test_union_id(const std::string &proto_path, opts.proto_mode = true; opts.proto_oneof_union = true; opts.keep_proto_id = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; std::string golden_file; TEST_EQ( @@ -108,6 +112,7 @@ void proto_test_union_suffix(const std::string &proto_path, opts.proto_mode = true; opts.proto_namespace_suffix = "test_namespace_suffix"; opts.proto_oneof_union = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; std::string golden_file; TEST_EQ(flatbuffers::LoadFile( @@ -125,6 +130,7 @@ void proto_test_union_suffix_id(const std::string &proto_path, opts.proto_namespace_suffix = "test_namespace_suffix"; opts.proto_oneof_union = true; opts.keep_proto_id = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; std::string golden_file; TEST_EQ(flatbuffers::LoadFile( @@ -140,6 +146,7 @@ void proto_test_include(const std::string &proto_path, flatbuffers::IDLOptions opts; opts.include_dependence_headers = true; opts.proto_mode = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; std::string golden_file; TEST_EQ( @@ -157,6 +164,7 @@ void proto_test_include_id(const std::string &proto_path, opts.include_dependence_headers = true; opts.proto_mode = true; opts.keep_proto_id = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; std::string golden_file; TEST_EQ( @@ -174,6 +182,7 @@ void proto_test_include_union(const std::string &proto_path, opts.include_dependence_headers = true; opts.proto_mode = true; opts.proto_oneof_union = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; std::string golden_file; TEST_EQ(flatbuffers::LoadFile( @@ -192,6 +201,7 @@ void proto_test_include_union_id(const std::string &proto_path, opts.proto_mode = true; opts.proto_oneof_union = true; opts.keep_proto_id = true; + opts.proto_id_gap_action = IDLOptions::ProtoIdGapAction::NO_OP; std::string golden_file; TEST_EQ(flatbuffers::LoadFile(