gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/tools/go_generics/rules_tests/BUILD (about)

     1  load("//tools:defs.bzl", "go_test")
     2  load("//tools/go_generics:defs.bzl", "go_template", "go_template_instance")
     3  
     4  package(
     5      default_applicable_licenses = ["//:license"],
     6      licenses = ["notice"],
     7  )
     8  
     9  go_template_instance(
    10      name = "instance",
    11      out = "instance_test.go",
    12      consts = {
    13          "n": "20",
    14          "m": "\"test\"",
    15          "o": "math.MaxUint64",
    16      },
    17      imports = {
    18          "math": "math",
    19      },
    20      package = "template_test",
    21      template = ":test_template",
    22      types = {
    23          "t": "int",
    24      },
    25  )
    26  
    27  go_template(
    28      name = "test_template",
    29      srcs = [
    30          "template.go",
    31      ],
    32      opt_consts = [
    33          "n",
    34          "m",
    35          "o",
    36      ],
    37      opt_types = ["t"],
    38  )
    39  
    40  go_test(
    41      name = "template_test",
    42      srcs = [
    43          "instance_test.go",
    44          "template_test.go",
    45      ],
    46  )