Files
codeql/swift/codegen/BUILD.bazel
Paolo Tranquilli f171ce6341 Swift: add unit tests to code generation
Tests can be run with
```
bazel test //swift/codegen:tests
```

Coverage can be checked installing `pytest-cov` and running
```
pytest --cov=swift/codegen swift/codegen/test
```
2022-04-27 08:24:11 +02:00

32 lines
483 B
Python

py_binary(
name = "codegen",
srcs = glob([
"lib/*.py",
"*.py",
]),
)
py_library(
name = "test_utils",
testonly = True,
srcs = ["test/utils.py"],
deps = [":codegen"],
)
[
py_test(
name = src[len("test/"):-len(".py")],
size = "small",
srcs = [src],
deps = [
":codegen",
":test_utils",
],
)
for src in glob(["test/test_*.py"])
]
test_suite(
name = "tests",
)