Jing Lu | 34e070d | 2023-11-08 02:47:10 -0800 | [diff] [blame^] | 1 | // Part of the Crubit project, under the Apache License v2.0 with LLVM |
| 2 | // Exceptions. See /LICENSE for license information. |
| 3 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 4 | |
| 5 | #[cfg(test)] |
| 6 | mod tests { |
| 7 | use item_exists::type_exists; |
| 8 | |
| 9 | #[test] |
| 10 | fn test_same_library() { |
| 11 | assert!(type_exists!(definition_and_forward_declaration_same_cc_library::A)); |
| 12 | } |
| 13 | |
| 14 | // TODO(b/309614052): Currently Crubit cannot generate bindings if the forward |
| 15 | // declaration and definition are from different targets. |
| 16 | #[test] |
| 17 | fn test_separate_library() { |
| 18 | assert!(!type_exists!(definition_and_forward_declaration_separate_cc_library::A)); |
| 19 | } |
| 20 | } |