run scripts/clang-format-all.sh

This commit is contained in:
Derek Bailey
2023-05-11 12:23:49 -07:00
parent c2f764c22b
commit 86486a1735
21 changed files with 115 additions and 101 deletions

View File

@@ -2,8 +2,8 @@
#include "flatbuffers/flatbuffers.h"
#include "flatbuffers/idl.h"
#include "monster_test_bfbs_generated.h"
#include "monster_test_generated.h"
#include "monster_test_bfbs_generated.h"
#include "optional_scalars_generated.h"
#include "test_assert.h"
@@ -13,7 +13,7 @@ namespace tests {
using namespace MyGame::Example;
// Check stringify of an default enum value to json
void JsonDefaultTest(const std::string& tests_data_path) {
void JsonDefaultTest(const std::string &tests_data_path) {
// load FlatBuffer schema (.fbs) from disk
std::string schemafile;
TEST_EQ(flatbuffers::LoadFile((tests_data_path + "monster_test.fbs").c_str(),
@@ -44,7 +44,7 @@ void JsonDefaultTest(const std::string& tests_data_path) {
TEST_EQ(std::string::npos != jsongen.find("testf: 3.14159"), true);
}
void JsonEnumsTest(const std::string& tests_data_path) {
void JsonEnumsTest(const std::string &tests_data_path) {
// load FlatBuffer schema (.fbs) from disk
std::string schemafile;
TEST_EQ(flatbuffers::LoadFile((tests_data_path + "monster_test.fbs").c_str(),
@@ -83,7 +83,8 @@ void JsonEnumsTest(const std::string& tests_data_path) {
TEST_EQ(std::string::npos != future_json.find("color: 13"), true);
}
void JsonOptionalTest(const std::string& tests_data_path, bool default_scalars) {
void JsonOptionalTest(const std::string &tests_data_path,
bool default_scalars) {
// load FlatBuffer schema (.fbs) and JSON from disk
std::string schemafile;
std::string jsonfile;
@@ -124,7 +125,7 @@ void JsonOptionalTest(const std::string& tests_data_path, bool default_scalars)
TEST_EQ_STR(jsongen.c_str(), jsonfile.c_str());
}
void ParseIncorrectMonsterJsonTest(const std::string& tests_data_path) {
void ParseIncorrectMonsterJsonTest(const std::string &tests_data_path) {
std::string schemafile;
TEST_EQ(flatbuffers::LoadFile((tests_data_path + "monster_test.bfbs").c_str(),
true, &schemafile),
@@ -179,7 +180,7 @@ table JsonUnionStructTest { union_with_struct: UnionWithStruct; }
root_type JsonUnionStructTest;
)";
// source text to parse and expected result of generation text back
auto json_source =R"({
auto json_source = R"({
union_with_struct_type: "MyStruct",
union_with_struct: {
field: 12345