Skip to content

Commit 4ce9553

Browse files
committed
Add test for issue 1269.
1 parent a78d361 commit 4ce9553

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

integration-tests/tests/integration_test.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6057,6 +6057,18 @@ fn test_error_generated_for_pod_with_nontrivial_destructor() {
60576057
run_test_expect_fail("", hdr, rs, &["take_a"], &["A"]);
60586058
}
60596059

6060+
#[test]
6061+
fn test_error_generated_for_double_underscore() {
6062+
// take_a is necessary here because cxx won't generate the required
6063+
// static assertions unless the type is actually used in some context
6064+
// where cxx needs to decide it's trivial or non-trivial.
6065+
let hdr = indoc! {"
6066+
inline void __thingy() {}
6067+
"};
6068+
let rs = quote! {};
6069+
run_test_expect_fail("", hdr, rs, &["__thingy"], &[]);
6070+
}
6071+
60606072
#[test]
60616073
fn test_error_generated_for_pod_with_nontrivial_move_constructor() {
60626074
// take_a is necessary here because cxx won't generate the required

0 commit comments

Comments
 (0)