mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
proto_test.cpp don't warn about gaps
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user