Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
index a1bdad7bcc1..fc1f30c02c7 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
@@ -13049,4 +13049,43 @@ public class AST2CPPTests extends AST2CPPTestBase {
BindingAssertionHelper bh = getAssertionHelper();
bh.assertImplicitName("b{v};", 1, IProblemBinding.class);
}
+
+ // struct type {
+ // char data[2];
+ // };
+ //
+ // type foo{"s"};
+ public void testCharArrayInitFromStringLiteral_545756() throws Exception {
+ parseAndCheckImplicitNameBindings();
+ }
+
+ // struct type {
+ // char data[3];
+ // };
+ //
+ // type foo{"big"};
+ public void testCharArrayInitFromTooLargeStringLiteral_545756() throws Exception {
+ BindingAssertionHelper bh = getAssertionHelper();
+ bh.assertImplicitName("foo", 3, IProblemBinding.class);
+ }
+
+ // struct type {
+ // char data[2];
+ // };
+ //
+ // type foo{L"s"};
+ public void testCharArrayInitFromWrongTypeStringLiteral_545756() throws Exception {
+ BindingAssertionHelper bh = getAssertionHelper();
+ bh.assertImplicitName("foo", 3, IProblemBinding.class);
+ }
+
+ // struct type {
+ // const char data[];
+ // };
+ //
+ // type foo{"s"};
+ public void testUnknownSizeCharArrayInitFromStringLiteral_545756() throws Exception {
+ BindingAssertionHelper bh = getAssertionHelper();
+ bh.assertImplicitName("foo", 3, IProblemBinding.class);
+ }
}

Back to the top