gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/segment/test/BUILD (about) 1 load("//tools:defs.bzl", "go_library", "go_test") 2 load("//tools/go_generics:defs.bzl", "go_template_instance") 3 4 package( 5 default_applicable_licenses = ["//:license"], 6 default_visibility = ["//visibility:private"], 7 licenses = ["notice"], 8 ) 9 10 go_template_instance( 11 name = "int_range", 12 out = "int_range.go", 13 package = "segment", 14 template = "//pkg/segment:generic_range", 15 types = { 16 "T": "int", 17 }, 18 ) 19 20 go_template_instance( 21 name = "int_set", 22 out = "int_set.go", 23 package = "segment", 24 template = "//pkg/segment:generic_set", 25 types = { 26 "Key": "int", 27 "Range": "Range", 28 "Value": "int", 29 "Functions": "setFunctions", 30 }, 31 ) 32 33 go_template_instance( 34 name = "gap_set", 35 out = "gap_set.go", 36 consts = { 37 "trackGaps": "1", 38 }, 39 package = "segment", 40 prefix = "gap", 41 template = "//pkg/segment:generic_set", 42 types = { 43 "Key": "int", 44 "Range": "Range", 45 "Value": "int", 46 "Functions": "gapSetFunctions", 47 }, 48 ) 49 50 go_library( 51 name = "segment", 52 testonly = 1, 53 srcs = [ 54 "gap_set.go", 55 "int_range.go", 56 "int_set.go", 57 "set_functions.go", 58 ], 59 deps = [ 60 "//pkg/state", 61 ], 62 ) 63 64 go_test( 65 name = "segment_test", 66 size = "small", 67 srcs = ["segment_test.go"], 68 library = ":segment", 69 )