]> git.eshelyaron.com Git - emacs.git/commitdiff
Added more test data
authorEric Ludlam <zappo@gnu.org>
Mon, 30 Dec 2013 21:33:24 +0000 (16:33 -0500)
committerEdward John Steere <edward.steere@gmail.com>
Wed, 25 Jan 2017 17:28:21 +0000 (19:28 +0200)
* test/manual/cedet/cedet/semantic/tests/testvarnames.c:
 (varorstruct): New struct and variable.  (assigntovarorstruct): New
 variable that doesn't start with 'var'. (test_1): Add test when
 assigning into varorstruct that we get a match.

test/manual/cedet/cedet/semantic/tests/testvarnames.c

index 50dd035be20d782dba9fe7aade678b696ecc93cf..9aa30bb547763bbfc14711b29ae6229c20d15b16 100644 (file)
@@ -37,6 +37,17 @@ struct inline2struct {
 struct inlinestruct in_var1;
 struct inline2struct in_var2;
 
+/*
+ * Structures (or any types) could have the same name as a variable.
+ * Make sure we complete vars over types.
+ *
+ * See cedet-devel mailing list Dec 23, 2013 for details.
+ */
+struct varorstruct {};
+int varorstruct;
+
+int assigntovarorstruct;
+
 int test_1(int var_arg1) {
 
   var_// -1-
@@ -68,4 +79,7 @@ int test_1(int var_arg1) {
     ; // #10# ( "named_1" "named_2")
   in_var2.// -11-
     ; // #11# ( "named_3" "named_4")
+
+  varorstruct = assign// -12-
+    ; // #12# ( "assigntovarorstruct" )
 }