xref: /aosp_15_r20/external/bazelbuild-rules_rust/test/unpretty/BUILD.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifanload("@bazel_skylib//rules:diff_test.bzl", "diff_test")
2*d4726bddSHONG Yifanload("//rust:defs.bzl", "rust_proc_macro", "rust_test", "rust_unpretty")
3*d4726bddSHONG Yifan
4*d4726bddSHONG Yifanrust_proc_macro(
5*d4726bddSHONG Yifan    name = "proc_macro",
6*d4726bddSHONG Yifan    srcs = ["proc_macro.rs"],
7*d4726bddSHONG Yifan    edition = "2021",
8*d4726bddSHONG Yifan    visibility = ["//test:__subpackages__"],
9*d4726bddSHONG Yifan)
10*d4726bddSHONG Yifan
11*d4726bddSHONG Yifanrust_unpretty(
12*d4726bddSHONG Yifan    name = "proc_macro_unpretty",
13*d4726bddSHONG Yifan    testonly = True,
14*d4726bddSHONG Yifan    mode = "expanded",
15*d4726bddSHONG Yifan    deps = [":proc_macro"],
16*d4726bddSHONG Yifan)
17*d4726bddSHONG Yifan
18*d4726bddSHONG Yifandiff_test(
19*d4726bddSHONG Yifan    name = "proc_macro_unpretty_diff_test",
20*d4726bddSHONG Yifan    file1 = "proc_macro.unpretty.expanded.rs",
21*d4726bddSHONG Yifan    file2 = ":proc_macro_unpretty",
22*d4726bddSHONG Yifan)
23*d4726bddSHONG Yifan
24*d4726bddSHONG Yifanrust_test(
25*d4726bddSHONG Yifan    name = "proc_macro_test",
26*d4726bddSHONG Yifan    srcs = ["proc_macro_test.rs"],
27*d4726bddSHONG Yifan    edition = "2021",
28*d4726bddSHONG Yifan    proc_macro_deps = [":proc_macro"],
29*d4726bddSHONG Yifan)
30*d4726bddSHONG Yifan
31*d4726bddSHONG Yifanrust_unpretty(
32*d4726bddSHONG Yifan    name = "proc_macro_test_unpretty",
33*d4726bddSHONG Yifan    testonly = True,
34*d4726bddSHONG Yifan    mode = "expanded",
35*d4726bddSHONG Yifan    deps = [":proc_macro_test"],
36*d4726bddSHONG Yifan)
37*d4726bddSHONG Yifan
38*d4726bddSHONG Yifanrust_unpretty(
39*d4726bddSHONG Yifan    name = "proc_macro_test_unpretty_extra",
40*d4726bddSHONG Yifan    testonly = True,
41*d4726bddSHONG Yifan    mode = "normal",
42*d4726bddSHONG Yifan    deps = [":proc_macro_test"],
43*d4726bddSHONG Yifan)
44*d4726bddSHONG Yifan
45*d4726bddSHONG Yifandiff_test(
46*d4726bddSHONG Yifan    name = "proc_macro_test_unpretty_diff_test",
47*d4726bddSHONG Yifan    file1 = "proc_macro.unpretty.expanded.rs",
48*d4726bddSHONG Yifan    file2 = ":proc_macro_unpretty",
49*d4726bddSHONG Yifan)
50