Files
carbon-lang/executable_semantics/fuzzing/BUILD
T
f8ded337fb Carbon fuzzing 2/3: added logic for converting carbon.proto to a Carbon source string. (#1155)
* Carbon fuzzing 2/3: added logic for converting carbon.proto to a Carbon source string.

* adjusted to proto changes in proto PR

* addressed todos

* removed unnecessary has_xx() calls

* minor fix

* sync from part 1

* Update executable_semantics/fuzzing/proto_to_carbon_test.cpp

Co-authored-by: Geoff Romer <gromer@google.com>

* review comments

* Update common/fuzzing/proto_to_carbon.cpp

Co-authored-by: Jon Meow <jperkins@google.com>

* Update common/fuzzing/proto_to_carbon.cpp

Co-authored-by: Jon Meow <jperkins@google.com>

* code review

* code review

* Update common/fuzzing/proto_to_carbon.cpp

Co-authored-by: Jon Meow <jperkins@google.com>

* code review

* merged + added support for type_params in class

* use <> includes for protobuf

* review comments

* code review comments

Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: Jon Meow <jperkins@google.com>
2022-03-30 14:29:35 -04:00

60 lines
1.8 KiB
Python

# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
cc_library(
name = "ast_to_proto_lib",
srcs = ["ast_to_proto.cpp"],
hdrs = ["ast_to_proto.h"],
deps = [
"//common/fuzzing:carbon_cc_proto",
"//executable_semantics/ast",
"//executable_semantics/ast:declaration",
"//executable_semantics/ast:expression",
"@llvm-project//llvm:Support",
],
)
cc_test(
name = "ast_to_proto_test",
srcs = ["ast_to_proto_test.cpp"],
args = [
"$(locations //executable_semantics:standard_libraries)",
"$(locations //executable_semantics/testdata:carbon_files)",
],
data = [
"//executable_semantics:standard_libraries",
"//executable_semantics/testdata:carbon_files",
],
deps = [
":ast_to_proto_lib",
"//common/fuzzing:carbon_cc_proto",
"//executable_semantics/syntax",
"@com_google_googletest//:gtest",
"@com_google_protobuf//:protobuf_headers",
"@llvm-project//llvm:Support",
],
)
cc_test(
name = "proto_to_carbon_test",
srcs = ["proto_to_carbon_test.cpp"],
args = [
"$(locations //executable_semantics:standard_libraries)",
"$(locations //executable_semantics/testdata:carbon_files)",
],
data = [
"//executable_semantics:standard_libraries",
"//executable_semantics/testdata:carbon_files",
],
deps = [
":ast_to_proto_lib",
"//common/fuzzing:carbon_cc_proto",
"//common/fuzzing:proto_to_carbon_lib",
"//executable_semantics/syntax",
"@com_google_googletest//:gtest",
"@com_google_protobuf//:protobuf_headers",
"@llvm-project//llvm:Support",
],
)