Files
flatbuffers-bigfoot/tests/proto_test.h
Saman f838017860 Parsing from proto should keep field ID. (fixes #7645) (#7655)
* Parsing from proto should keep field ID. (fixes #7645)

* Fix failed tests

* Fix windows warning

* Improve attribute generation in proto to fbs

* Check if id is used twice. fix Some clang-format problems

* Test if fake id can solve the test problem

* Validate proto file in proto -> fbs generation.

* Fix error messages

* Ignore id in union

* Add keep proto id for legacy and check gap flag have been added. Reserved id will be checked.

* Add needed flags

* unit tests

* fix fromat problem. fix comments and error messages.

* clear

* More unit tests

* Fix windows build

* Fix include problems

* Fake commit to invoke rebuild

* Fix buzel build

* Fix some issues

* Fix comments, fix return value and sort for android NDK

* Fix return type

* Break down big function

* Place todo

---------

Co-authored-by: Derek Bailey <derekbailey@google.com>
2023-02-01 11:17:35 -08:00

33 lines
1.5 KiB
C++

#ifndef TESTS_PROTO_TEST_H
#define TESTS_PROTO_TEST_H
#include "flatbuffers/idl.h"
#include <string>
namespace flatbuffers {
namespace tests {
void RunTest(const flatbuffers::IDLOptions &opts, const std::string &proto_path, const std::string &proto_file,
const std::string &golden_file, const std::string import_proto_file = {});
void proto_test(const std::string &proto_path, const std::string &proto_file);
void proto_test_union(const std::string &proto_path, const std::string &proto_file);
void proto_test_union_suffix(const std::string &proto_path, const std::string &proto_file);
void proto_test_include(const std::string &proto_path, const std::string &proto_file, const std::string &import_proto_file);
void proto_test_include_union(const std::string &proto_path, const std::string &proto_file, const std::string &import_proto_file);
void proto_test_id(const std::string &proto_path, const std::string &proto_file);
void proto_test_union_id(const std::string &proto_path, const std::string &proto_file);
void proto_test_union_suffix_id(const std::string &proto_path, const std::string &proto_file);
void proto_test_include_id(const std::string &proto_path, const std::string &proto_file, const std::string &import_proto_file);
void proto_test_include_union_id(const std::string &proto_path, const std::string &proto_file, const std::string &import_proto_file);
void ParseCorruptedProto(const std::string &proto_path);
void ParseProtoTest(const std::string& tests_data_path);
void ParseProtoBufAsciiTest();
} // namespace tests
} // namespace flatbuffers
#endif