aboutsummaryrefslogtreecommitdiff
path: root/test/testdata/cpp_basic_test/input.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'test/testdata/cpp_basic_test/input.bzl')
-rw-r--r--test/testdata/cpp_basic_test/input.bzl20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/testdata/cpp_basic_test/input.bzl b/test/testdata/cpp_basic_test/input.bzl
new file mode 100644
index 0000000..b927e42
--- /dev/null
+++ b/test/testdata/cpp_basic_test/input.bzl
@@ -0,0 +1,20 @@
+# buildifier: disable=module-docstring
+# buildifier: disable=function-docstring
+def exercise_the_api():
+ var1 = cc_common.CcToolchainInfo
+
+exercise_the_api()
+
+def my_rule_impl(ctx):
+ return []
+
+cpp_related_rule = rule(
+ implementation = my_rule_impl,
+ doc = "This rule does cpp-related things.",
+ attrs = {
+ "first": attr.label(mandatory = True, allow_single_file = True),
+ "second": attr.string_dict(mandatory = True),
+ "third": attr.output(mandatory = True),
+ "fourth": attr.bool(default = False, mandatory = False),
+ },
+)