Skip to content

Commit

Permalink
add bazel files
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaileychess committed Aug 28, 2022
1 parent 35e43a5 commit 1f15d7b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
21 changes: 21 additions & 0 deletions tests/BUILD.bazel
Expand Up @@ -9,20 +9,41 @@ cc_test(
name = "flatbuffers_test",
testonly = 1,
srcs = [
"evolution_test.cpp",
"evolution_test.h",
"evolution_test/evolution_v1_generated.h",
"evolution_test/evolution_v2_generated.h",
"flexbuffers_test.cpp",
"flexbuffers_test.h",
"fuzz_test.cpp",
"fuzz_test.h",
"is_quiet_nan.h",
"json_test.cpp",
"json_test.h",
"monster_test.cpp",
"monster_test.h",
"monster_test_bfbs_generated.h",
"namespace_test/namespace_test1_generated.h",
"namespace_test/namespace_test2_generated.h",
"native_type_test_impl.cpp",
"native_type_test_impl.h",
"optional_scalars_generated.h",
"optional_scalars_test.cpp",
"optional_scalars_test.h",
"parser_test.cpp",
"parser_test.h",
"proto_test.cpp",
"proto_test.h",
"reflection_test.cpp",
"reflection_test.h",
"test.cpp",
"test_assert.cpp",
"test_assert.h",
"test_builder.cpp",
"test_builder.h",
"union_vector/union_vector_generated.h",
"util_test.cpp",
"util_test.h",
],
copts = [
"-DFLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE",
Expand Down
6 changes: 2 additions & 4 deletions tests/util_test.cpp
Expand Up @@ -130,8 +130,7 @@ void UtilConvertCase() {
std::string expected_output;
};

std::vector<TestCase>
cases;
std::vector<TestCase> cases;

cases.push_back({ flatbuffers::Case::kUpperCamel, "TheQuickBrownFox",
flatbuffers::Case::kSnake, "the_quick_brown_fox" });
Expand All @@ -158,8 +157,7 @@ void UtilConvertCase() {

for (auto &test_case : cases) {
TEST_EQ(test_case.expected_output,
flatbuffers::ConvertCase(test_case.input,
test_case.output_case,
flatbuffers::ConvertCase(test_case.input, test_case.output_case,
test_case.input_case));
}
}
Expand Down

0 comments on commit 1f15d7b

Please sign in to comment.