github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/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(licenses = ["notice"]) 5 6 go_template_instance( 7 name = "instance", 8 out = "instance_test.go", 9 consts = { 10 "n": "20", 11 "m": "\"test\"", 12 "o": "math.MaxUint64", 13 }, 14 imports = { 15 "math": "math", 16 }, 17 package = "template_test", 18 template = ":test_template", 19 types = { 20 "t": "int", 21 }, 22 ) 23 24 go_template( 25 name = "test_template", 26 srcs = [ 27 "template.go", 28 ], 29 opt_consts = [ 30 "n", 31 "m", 32 "o", 33 ], 34 opt_types = ["t"], 35 ) 36 37 go_test( 38 name = "template_test", 39 srcs = [ 40 "instance_test.go", 41 "template_test.go", 42 ], 43 )