mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 06:05:17 +00:00
Use the Google Style for clang-format without exceptions (#8706)
This reduces the friction when merging from github and google repos by using the exact same clang style guide. MARKDOWN=true
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
namespace flatbuffers {
|
||||
namespace tests {
|
||||
|
||||
void EvolutionTest(const std::string &tests_data_path) {
|
||||
void EvolutionTest(const std::string& tests_data_path) {
|
||||
// VS10 does not support typed enums, exclude from tests
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1700
|
||||
const int NUM_VERSIONS = 2;
|
||||
@@ -83,8 +83,8 @@ void EvolutionTest(const std::string &tests_data_path) {
|
||||
void ConformTest() {
|
||||
const char ref[] = "table T { A:int; } enum E:byte { A }";
|
||||
|
||||
auto test_conform = [](const char *ref, const char *test,
|
||||
const char *expected_err) {
|
||||
auto test_conform = [](const char* ref, const char* test,
|
||||
const char* expected_err) {
|
||||
flatbuffers::Parser parser1;
|
||||
TEST_EQ(parser1.Parse(ref), true);
|
||||
flatbuffers::Parser parser2;
|
||||
@@ -112,11 +112,13 @@ void ConformTest() {
|
||||
"field renamed to different type: T2.df (renamed from T2.f)");
|
||||
|
||||
// Check enum underlying type changes.
|
||||
test_conform("enum E:int32 {A}", "enum E: byte {A}", "underlying type differ for enum: E");
|
||||
|
||||
test_conform("enum E:int32 {A}", "enum E: byte {A}",
|
||||
"underlying type differ for enum: E");
|
||||
|
||||
// Check union underlying type changes.
|
||||
const char ref3[] = "table A {} table B {} union C {A, B}";
|
||||
test_conform(ref3, "table A {} table B {} union C:int32 {A, B}", "underlying type differ for union: C");
|
||||
test_conform(ref3, "table A {} table B {} union C:int32 {A, B}",
|
||||
"underlying type differ for union: C");
|
||||
|
||||
// Check conformity for Offset64-related changes.
|
||||
{
|
||||
@@ -151,7 +153,7 @@ void ConformTest() {
|
||||
}
|
||||
}
|
||||
|
||||
void UnionDeprecationTest(const std::string &tests_data_path) {
|
||||
void UnionDeprecationTest(const std::string& tests_data_path) {
|
||||
const int NUM_VERSIONS = 2;
|
||||
std::string schemas[NUM_VERSIONS];
|
||||
std::string jsonfiles[NUM_VERSIONS];
|
||||
|
||||
Reference in New Issue
Block a user