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", "GenJavaTests") 24 25package(default_visibility = ["//:src"]) 26 27GenJavaTests( 28 name = "MultibindingTest", 29 srcs = [ 30 "BooleanKey.java", 31 "ByteKey.java", 32 "CharKey.java", 33 "MultibindingComponent.java", 34 "MultibindingDependency.java", 35 "MultibindingModule.java", 36 "MultibindingTest.java", 37 "MultibindsModule.java", 38 "NestedAnnotationContainer.java", 39 "NumberClassKey.java", 40 "RequiresFieldInjection.java", 41 "ShortKey.java", 42 "UnwrappedAnnotationKey.java", 43 "WrappedAnnotationKey.java", 44 ], 45 gen_library_deps = [ 46 "//javatests/dagger/functional/multibindings/subpackage:ContributionsModule", 47 ], 48 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 49 deps = [ 50 "//:dagger_with_compiler", 51 "//third_party/java/auto:value", 52 "//third_party/java/junit", 53 "//third_party/java/truth", 54 ], 55) 56 57GenJavaTests( 58 name = "BindsInaccessibleMapKeyTest", 59 srcs = ["BindsInaccessibleMapKeyTest.java"], 60 gen_library_deps = [ 61 "//javatests/dagger/functional/multibindings/subpackage:BindsInaccessibleMapKeyModule", 62 ], 63 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 64 deps = [ 65 "//:dagger_with_compiler", 66 "//third_party/java/guava/collect", 67 "//third_party/java/junit", 68 "//third_party/java/truth", 69 ], 70) 71 72GenJavaTests( 73 name = "ClassKeyWithGenericsTest", 74 srcs = ["ClassKeyWithGenericsTest.java"], 75 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 76 deps = [ 77 "//:dagger_with_compiler", 78 "//third_party/java/junit", 79 "//third_party/java/truth", 80 ], 81) 82 83GenJavaTests( 84 name = "LazyClassKeyWithGenericsTest", 85 srcs = ["LazyClassKeyWithGenericsTest.java"], 86 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 87 deps = [ 88 "//:dagger_with_compiler", 89 "//third_party/java/junit", 90 "//third_party/java/truth", 91 ], 92) 93 94GenJavaTests( 95 name = "ComplexMapKeysInDifferentOrderTest", 96 srcs = ["ComplexMapKeysInDifferentOrderTest.java"], 97 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 98 deps = [ 99 "//:dagger_with_compiler", 100 "//third_party/java/auto:value", 101 "//third_party/java/junit", 102 "//third_party/java/truth", 103 ], 104) 105 106GenJavaTests( 107 name = "MapKeyWithDefaultTest", 108 srcs = ["MapKeyWithDefaultTest.java"], 109 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 110 deps = [ 111 "//:dagger_with_compiler", 112 "//third_party/java/auto:value", 113 "//third_party/java/junit", 114 "//third_party/java/truth", 115 ], 116) 117 118GenJavaTests( 119 name = "LazyMapsTest", 120 srcs = [ 121 "LazyMaps.java", 122 "LazyMapsTest.java", 123 ], 124 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 125 deps = [ 126 "//:dagger_with_compiler", 127 "//third_party/java/junit", 128 "//third_party/java/truth", 129 ], 130) 131