Wei Li | bafb6d6 | 2021-12-10 03:14:59 -0800 | [diff] [blame] | 1 | // Copyright 2021 Google Inc. All rights reserved. |
| 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 | package bp2build |
| 16 | |
| 17 | import ( |
| 18 | "testing" |
| 19 | |
| 20 | "android/soong/android" |
| 21 | "android/soong/cc" |
| 22 | "android/soong/java" |
| 23 | ) |
| 24 | |
Sam Delmerico | 3177a6e | 2022-06-21 19:28:33 +0000 | [diff] [blame] | 25 | func runJavaBinaryHostTestCase(t *testing.T, tc Bp2buildTestCase) { |
Wei Li | bafb6d6 | 2021-12-10 03:14:59 -0800 | [diff] [blame] | 26 | t.Helper() |
Sam Delmerico | 3177a6e | 2022-06-21 19:28:33 +0000 | [diff] [blame] | 27 | (&tc).ModuleTypeUnderTest = "java_binary_host" |
| 28 | (&tc).ModuleTypeUnderTestFactory = java.BinaryHostFactory |
Chris Parsons | cd20903 | 2023-09-19 01:12:48 +0000 | [diff] [blame^] | 29 | tc.StubbedBuildDefinitions = append(tc.StubbedBuildDefinitions, "//other:jni-lib-1") |
Sam Delmerico | 3177a6e | 2022-06-21 19:28:33 +0000 | [diff] [blame] | 30 | RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) { |
Wei Li | bafb6d6 | 2021-12-10 03:14:59 -0800 | [diff] [blame] | 31 | ctx.RegisterModuleType("cc_library_host_shared", cc.LibraryHostSharedFactory) |
Sam Delmerico | c016143 | 2022-02-25 21:34:51 +0000 | [diff] [blame] | 32 | ctx.RegisterModuleType("java_library", java.LibraryFactory) |
Alix | b4e09a0 | 2022-09-27 15:36:01 +0000 | [diff] [blame] | 33 | ctx.RegisterModuleType("java_import_host", java.ImportFactory) |
Wei Li | bafb6d6 | 2021-12-10 03:14:59 -0800 | [diff] [blame] | 34 | }, tc) |
| 35 | } |
| 36 | |
Lukacs T. Berki | bc5f731 | 2022-10-31 09:01:34 +0000 | [diff] [blame] | 37 | var testFs = map[string]string{ |
Wei Li | bafb6d6 | 2021-12-10 03:14:59 -0800 | [diff] [blame] | 38 | "test.mf": "Main-Class: com.android.test.MainClass", |
| 39 | "other/Android.bp": `cc_library_host_shared { |
| 40 | name: "jni-lib-1", |
| 41 | stl: "none", |
| 42 | }`, |
| 43 | } |
| 44 | |
| 45 | func TestJavaBinaryHost(t *testing.T) { |
Sam Delmerico | 3177a6e | 2022-06-21 19:28:33 +0000 | [diff] [blame] | 46 | runJavaBinaryHostTestCase(t, Bp2buildTestCase{ |
| 47 | Description: "java_binary_host with srcs, exclude_srcs, jni_libs, javacflags, and manifest.", |
Lukacs T. Berki | bc5f731 | 2022-10-31 09:01:34 +0000 | [diff] [blame] | 48 | Filesystem: testFs, |
Sam Delmerico | 3177a6e | 2022-06-21 19:28:33 +0000 | [diff] [blame] | 49 | Blueprint: `java_binary_host { |
Wei Li | bafb6d6 | 2021-12-10 03:14:59 -0800 | [diff] [blame] | 50 | name: "java-binary-host-1", |
| 51 | srcs: ["a.java", "b.java"], |
| 52 | exclude_srcs: ["b.java"], |
| 53 | manifest: "test.mf", |
| 54 | jni_libs: ["jni-lib-1"], |
Sam Delmerico | 4e27229 | 2022-01-06 20:03:51 +0000 | [diff] [blame] | 55 | javacflags: ["-Xdoclint:all/protected"], |
Wei Li | bafb6d6 | 2021-12-10 03:14:59 -0800 | [diff] [blame] | 56 | bazel_module: { bp2build_available: true }, |
Vinh Tran | 3ac6daf | 2022-04-22 19:09:58 -0400 | [diff] [blame] | 57 | java_version: "8", |
Wei Li | bafb6d6 | 2021-12-10 03:14:59 -0800 | [diff] [blame] | 58 | }`, |
Sam Delmerico | 3177a6e | 2022-06-21 19:28:33 +0000 | [diff] [blame] | 59 | ExpectedBazelTargets: []string{ |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 60 | MakeBazelTarget("java_library", "java-binary-host-1_lib", AttrNameToString{ |
Romain Jobredeaux | 2eef2e1 | 2023-02-24 12:07:08 -0500 | [diff] [blame] | 61 | "srcs": `["a.java"]`, |
| 62 | "deps": `["//other:jni-lib-1"]`, |
| 63 | "java_version": `"8"`, |
| 64 | "javacopts": `["-Xdoclint:all/protected"]`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 65 | "target_compatible_with": `select({ |
| 66 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 67 | "//conditions:default": [], |
Romain Jobredeaux | 2eef2e1 | 2023-02-24 12:07:08 -0500 | [diff] [blame] | 68 | })`, |
| 69 | }), |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 70 | MakeBazelTarget("java_binary", "java-binary-host-1", AttrNameToString{ |
Romain Jobredeaux | 2eef2e1 | 2023-02-24 12:07:08 -0500 | [diff] [blame] | 71 | "main_class": `"com.android.test.MainClass"`, |
Spandan Das | 5dba0ec | 2023-06-01 02:48:09 +0000 | [diff] [blame] | 72 | "jvm_flags": `["-Djava.library.path=$${RUNPATH}other/jni-lib-1"]`, |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 73 | "target_compatible_with": `select({ |
| 74 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 75 | "//conditions:default": [], |
Romain Jobredeaux | 2eef2e1 | 2023-02-24 12:07:08 -0500 | [diff] [blame] | 76 | })`, |
| 77 | "runtime_deps": `[":java-binary-host-1_lib"]`, |
| 78 | }), |
Wei Li | bafb6d6 | 2021-12-10 03:14:59 -0800 | [diff] [blame] | 79 | }, |
| 80 | }) |
| 81 | } |
Sam Delmerico | c016143 | 2022-02-25 21:34:51 +0000 | [diff] [blame] | 82 | |
| 83 | func TestJavaBinaryHostRuntimeDeps(t *testing.T) { |
Sam Delmerico | 3177a6e | 2022-06-21 19:28:33 +0000 | [diff] [blame] | 84 | runJavaBinaryHostTestCase(t, Bp2buildTestCase{ |
Chris Parsons | cd20903 | 2023-09-19 01:12:48 +0000 | [diff] [blame^] | 85 | Description: "java_binary_host with srcs, exclude_srcs, jni_libs, javacflags, and manifest.", |
| 86 | Filesystem: testFs, |
| 87 | StubbedBuildDefinitions: []string{"java-dep-1"}, |
Sam Delmerico | 3177a6e | 2022-06-21 19:28:33 +0000 | [diff] [blame] | 88 | Blueprint: `java_binary_host { |
Sam Delmerico | c016143 | 2022-02-25 21:34:51 +0000 | [diff] [blame] | 89 | name: "java-binary-host-1", |
| 90 | static_libs: ["java-dep-1"], |
| 91 | manifest: "test.mf", |
| 92 | bazel_module: { bp2build_available: true }, |
| 93 | } |
| 94 | |
| 95 | java_library { |
| 96 | name: "java-dep-1", |
| 97 | srcs: ["a.java"], |
Sam Delmerico | c016143 | 2022-02-25 21:34:51 +0000 | [diff] [blame] | 98 | } |
| 99 | `, |
Sam Delmerico | 3177a6e | 2022-06-21 19:28:33 +0000 | [diff] [blame] | 100 | ExpectedBazelTargets: []string{ |
Alix | e06d75b | 2022-08-31 18:28:19 +0000 | [diff] [blame] | 101 | MakeBazelTarget("java_binary", "java-binary-host-1", AttrNameToString{ |
Sam Delmerico | c016143 | 2022-02-25 21:34:51 +0000 | [diff] [blame] | 102 | "main_class": `"com.android.test.MainClass"`, |
| 103 | "runtime_deps": `[":java-dep-1"]`, |
| 104 | "target_compatible_with": `select({ |
| 105 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 106 | "//conditions:default": [], |
| 107 | })`, |
| 108 | }), |
| 109 | }, |
| 110 | }) |
| 111 | } |
Alix | b4e09a0 | 2022-09-27 15:36:01 +0000 | [diff] [blame] | 112 | |
| 113 | func TestJavaBinaryHostLibs(t *testing.T) { |
| 114 | runJavaBinaryHostTestCase(t, Bp2buildTestCase{ |
Chris Parsons | cd20903 | 2023-09-19 01:12:48 +0000 | [diff] [blame^] | 115 | Description: "java_binary_host with srcs, libs.", |
| 116 | Filesystem: testFs, |
| 117 | StubbedBuildDefinitions: []string{"prebuilt_java-lib-dep-1"}, |
Alix | b4e09a0 | 2022-09-27 15:36:01 +0000 | [diff] [blame] | 118 | Blueprint: `java_binary_host { |
| 119 | name: "java-binary-host-libs", |
| 120 | libs: ["java-lib-dep-1"], |
| 121 | manifest: "test.mf", |
| 122 | srcs: ["a.java"], |
| 123 | } |
| 124 | |
| 125 | java_import_host{ |
| 126 | name: "java-lib-dep-1", |
| 127 | jars: ["foo.jar"], |
Alix | b4e09a0 | 2022-09-27 15:36:01 +0000 | [diff] [blame] | 128 | } |
| 129 | `, |
| 130 | ExpectedBazelTargets: []string{ |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 131 | MakeBazelTarget("java_library", "java-binary-host-libs_lib", AttrNameToString{ |
| 132 | "srcs": `["a.java"]`, |
| 133 | "deps": `[":java-lib-dep-1-neverlink"]`, |
Alix | b4e09a0 | 2022-09-27 15:36:01 +0000 | [diff] [blame] | 134 | "target_compatible_with": `select({ |
| 135 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 136 | "//conditions:default": [], |
| 137 | })`, |
| 138 | }), |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 139 | MakeBazelTarget("java_binary", "java-binary-host-libs", AttrNameToString{ |
| 140 | "main_class": `"com.android.test.MainClass"`, |
| 141 | "target_compatible_with": `select({ |
| 142 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 143 | "//conditions:default": [], |
| 144 | })`, |
| 145 | "runtime_deps": `[":java-binary-host-libs_lib"]`, |
| 146 | }), |
Alix | b4e09a0 | 2022-09-27 15:36:01 +0000 | [diff] [blame] | 147 | }, |
| 148 | }) |
| 149 | } |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 150 | |
| 151 | func TestJavaBinaryHostKotlinSrcs(t *testing.T) { |
| 152 | runJavaBinaryHostTestCase(t, Bp2buildTestCase{ |
| 153 | Description: "java_binary_host with srcs, libs.", |
| 154 | Filesystem: testFs, |
| 155 | Blueprint: `java_binary_host { |
| 156 | name: "java-binary-host", |
| 157 | manifest: "test.mf", |
| 158 | srcs: ["a.java", "b.kt"], |
| 159 | } |
| 160 | `, |
| 161 | ExpectedBazelTargets: []string{ |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 162 | MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{ |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 163 | "srcs": `[ |
| 164 | "a.java", |
| 165 | "b.kt", |
| 166 | ]`, |
| 167 | "target_compatible_with": `select({ |
| 168 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 169 | "//conditions:default": [], |
| 170 | })`, |
| 171 | }), |
| 172 | MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{ |
| 173 | "main_class": `"com.android.test.MainClass"`, |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 174 | "runtime_deps": `[":java-binary-host_lib"]`, |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 175 | "target_compatible_with": `select({ |
| 176 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 177 | "//conditions:default": [], |
| 178 | })`, |
| 179 | }), |
| 180 | }, |
| 181 | }) |
| 182 | } |
| 183 | |
| 184 | func TestJavaBinaryHostKotlinCommonSrcs(t *testing.T) { |
| 185 | runJavaBinaryHostTestCase(t, Bp2buildTestCase{ |
| 186 | Description: "java_binary_host with common_srcs", |
| 187 | Filesystem: testFs, |
| 188 | Blueprint: `java_binary_host { |
| 189 | name: "java-binary-host", |
| 190 | manifest: "test.mf", |
| 191 | srcs: ["a.java"], |
| 192 | common_srcs: ["b.kt"], |
| 193 | } |
| 194 | `, |
| 195 | ExpectedBazelTargets: []string{ |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 196 | MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{ |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 197 | "srcs": `["a.java"]`, |
| 198 | "common_srcs": `["b.kt"]`, |
| 199 | "target_compatible_with": `select({ |
| 200 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 201 | "//conditions:default": [], |
| 202 | })`, |
| 203 | }), |
| 204 | MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{ |
| 205 | "main_class": `"com.android.test.MainClass"`, |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 206 | "runtime_deps": `[":java-binary-host_lib"]`, |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 207 | "target_compatible_with": `select({ |
| 208 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 209 | "//conditions:default": [], |
| 210 | })`, |
| 211 | }), |
| 212 | }, |
| 213 | }) |
| 214 | } |
| 215 | |
| 216 | func TestJavaBinaryHostKotlinWithResourceDir(t *testing.T) { |
| 217 | runJavaBinaryHostTestCase(t, Bp2buildTestCase{ |
| 218 | Description: "java_binary_host with srcs, libs, resource dir .", |
| 219 | Filesystem: map[string]string{ |
| 220 | "test.mf": "Main-Class: com.android.test.MainClass", |
| 221 | "res/a.res": "", |
| 222 | "res/dir1/b.res": "", |
| 223 | }, |
| 224 | Blueprint: `java_binary_host { |
| 225 | name: "java-binary-host", |
| 226 | manifest: "test.mf", |
| 227 | srcs: ["a.java", "b.kt"], |
| 228 | java_resource_dirs: ["res"], |
| 229 | } |
| 230 | `, |
| 231 | ExpectedBazelTargets: []string{ |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 232 | MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{ |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 233 | "srcs": `[ |
| 234 | "a.java", |
| 235 | "b.kt", |
| 236 | ]`, |
Alix | 5afd9fa | 2023-03-03 19:22:15 +0000 | [diff] [blame] | 237 | "resources": `[ |
| 238 | "res/a.res", |
| 239 | "res/dir1/b.res", |
| 240 | ]`, |
| 241 | "resource_strip_prefix": `"res"`, |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 242 | "target_compatible_with": `select({ |
| 243 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 244 | "//conditions:default": [], |
| 245 | })`, |
| 246 | }), |
| 247 | MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{ |
| 248 | "main_class": `"com.android.test.MainClass"`, |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 249 | "runtime_deps": `[":java-binary-host_lib"]`, |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 250 | "target_compatible_with": `select({ |
| 251 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 252 | "//conditions:default": [], |
| 253 | })`, |
| 254 | }), |
| 255 | }, |
| 256 | }) |
| 257 | } |
| 258 | |
| 259 | func TestJavaBinaryHostKotlinWithResources(t *testing.T) { |
| 260 | runJavaBinaryHostTestCase(t, Bp2buildTestCase{ |
| 261 | Description: "java_binary_host with srcs, libs, resources.", |
| 262 | Filesystem: map[string]string{ |
Romain Jobredeaux | d5fe133 | 2023-05-04 14:54:45 -0400 | [diff] [blame] | 263 | "adir/test.mf": "Main-Class: com.android.test.MainClass", |
| 264 | "adir/res/a.res": "", |
| 265 | "adir/res/b.res": "", |
| 266 | "adir/Android.bp": `java_binary_host { |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 267 | name: "java-binary-host", |
| 268 | manifest: "test.mf", |
| 269 | srcs: ["a.java", "b.kt"], |
| 270 | java_resources: ["res/a.res", "res/b.res"], |
Romain Jobredeaux | d5fe133 | 2023-05-04 14:54:45 -0400 | [diff] [blame] | 271 | bazel_module: { bp2build_available: true }, |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 272 | } |
| 273 | `, |
Romain Jobredeaux | d5fe133 | 2023-05-04 14:54:45 -0400 | [diff] [blame] | 274 | }, |
| 275 | Dir: "adir", |
| 276 | Blueprint: "", |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 277 | ExpectedBazelTargets: []string{ |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 278 | MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{ |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 279 | "srcs": `[ |
| 280 | "a.java", |
| 281 | "b.kt", |
| 282 | ]`, |
| 283 | "resources": `[ |
| 284 | "res/a.res", |
| 285 | "res/b.res", |
| 286 | ]`, |
Romain Jobredeaux | d5fe133 | 2023-05-04 14:54:45 -0400 | [diff] [blame] | 287 | "resource_strip_prefix": `"adir"`, |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 288 | "target_compatible_with": `select({ |
| 289 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 290 | "//conditions:default": [], |
| 291 | })`, |
| 292 | }), |
| 293 | MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{ |
| 294 | "main_class": `"com.android.test.MainClass"`, |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 295 | "runtime_deps": `[":java-binary-host_lib"]`, |
Alix | 7c8eaeb | 2022-11-16 15:44:55 +0000 | [diff] [blame] | 296 | "target_compatible_with": `select({ |
| 297 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 298 | "//conditions:default": [], |
| 299 | })`, |
| 300 | }), |
| 301 | }, |
| 302 | }) |
| 303 | } |
Alix | f848bf8 | 2023-03-06 19:43:55 +0000 | [diff] [blame] | 304 | |
| 305 | func TestJavaBinaryHostKotlinCflags(t *testing.T) { |
| 306 | runJavaBinaryHostTestCase(t, Bp2buildTestCase{ |
| 307 | Description: "java_binary_host with kotlincflags", |
| 308 | Filesystem: testFs, |
| 309 | Blueprint: `java_binary_host { |
| 310 | name: "java-binary-host", |
| 311 | manifest: "test.mf", |
| 312 | srcs: ["a.kt"], |
| 313 | kotlincflags: ["-flag1", "-flag2"], |
| 314 | } |
| 315 | `, |
| 316 | ExpectedBazelTargets: []string{ |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 317 | MakeBazelTarget("kt_jvm_library", "java-binary-host_lib", AttrNameToString{ |
Alix | f848bf8 | 2023-03-06 19:43:55 +0000 | [diff] [blame] | 318 | "srcs": `["a.kt"]`, |
| 319 | "kotlincflags": `[ |
| 320 | "-flag1", |
| 321 | "-flag2", |
| 322 | ]`, |
| 323 | "target_compatible_with": `select({ |
| 324 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 325 | "//conditions:default": [], |
| 326 | })`, |
| 327 | }), |
| 328 | MakeBazelTarget("java_binary", "java-binary-host", AttrNameToString{ |
| 329 | "main_class": `"com.android.test.MainClass"`, |
Romain Jobredeaux | f5f6073 | 2023-03-16 11:00:36 -0400 | [diff] [blame] | 330 | "runtime_deps": `[":java-binary-host_lib"]`, |
Alix | f848bf8 | 2023-03-06 19:43:55 +0000 | [diff] [blame] | 331 | "target_compatible_with": `select({ |
| 332 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 333 | "//conditions:default": [], |
| 334 | })`, |
| 335 | }), |
| 336 | }, |
| 337 | }) |
| 338 | } |