1# Copyright (C) 2022 The Dagger Authors. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15# Description: 16# Functional tests for Dagger multibinding usages. 17 18load( 19 "//:build_defs.bzl", 20 "DOCLINT_HTML_AND_SYNTAX", 21 "DOCLINT_REFERENCES", 22) 23load("//:test_defs.bzl", "GenKtTests") 24 25package(default_visibility = ["//:src"]) 26 27GenKtTests( 28 name = "MultibindingTest", 29 srcs = [ 30 "BooleanKey.kt", 31 "ByteKey.kt", 32 "CharKey.kt", 33 "MultibindingComponent.kt", 34 "MultibindingDependency.kt", 35 "MultibindingModule.kt", 36 "MultibindingTest.kt", 37 "MultibindsModule.kt", 38 "NestedAnnotationContainer.kt", 39 "NumberClassKey.kt", 40 "ShortKey.kt", 41 "UnwrappedAnnotationKey.kt", 42 "WrappedAnnotationKey.kt", 43 ], 44 gen_library_deps = [ 45 "//javatests/dagger/functional/kotlinsrc/multibindings/subpackage:ContributionsModule", 46 ], 47 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 48 deps = [ 49 "//:dagger_with_compiler", 50 "//third_party/java/auto:value", 51 "//third_party/java/junit", 52 "//third_party/java/truth", 53 ], 54) 55 56GenKtTests( 57 name = "BindsInaccessibleMapKeyTest", 58 srcs = ["BindsInaccessibleMapKeyTest.kt"], 59 gen_library_deps = [ 60 "//javatests/dagger/functional/kotlinsrc/multibindings/subpackage:BindsInaccessibleMapKeyModule", 61 ], 62 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 63 deps = [ 64 "//:dagger_with_compiler", 65 "//third_party/java/junit", 66 "//third_party/java/truth", 67 ], 68) 69 70GenKtTests( 71 name = "ClassKeyWithGenericsTest", 72 srcs = ["ClassKeyWithGenericsTest.kt"], 73 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 74 deps = [ 75 "//:dagger_with_compiler", 76 "//third_party/java/junit", 77 "//third_party/java/truth", 78 ], 79) 80 81GenKtTests( 82 name = "ComplexMapKeysInDifferentOrderTest", 83 srcs = ["ComplexMapKeysInDifferentOrderTest.kt"], 84 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 85 deps = [ 86 "//:dagger_with_compiler", 87 "//third_party/java/auto:value", 88 "//third_party/java/junit", 89 "//third_party/java/truth", 90 ], 91) 92 93GenKtTests( 94 name = "MapKeyWithDefaultTest", 95 srcs = ["MapKeyWithDefaultTest.kt"], 96 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 97 deps = [ 98 "//:dagger_with_compiler", 99 "//third_party/java/auto:value", 100 "//third_party/java/junit", 101 "//third_party/java/truth", 102 ], 103) 104 105GenKtTests( 106 name = "LazyMapsTest", 107 srcs = [ 108 "LazyMaps.kt", 109 "LazyMapsTest.kt", 110 ], 111 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 112 deps = [ 113 "//:dagger_with_compiler", 114 "//third_party/java/junit", 115 "//third_party/java/truth", 116 ], 117) 118