emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0f7163a 1/4: * test/manual/cedet/tests/: New files for semantic-u


From: Stefan Monnier
Subject: master 0f7163a 1/4: * test/manual/cedet/tests/: New files for semantic-utest-ia.el
Date: Thu, 31 Oct 2019 19:06:06 -0400 (EDT)

branch: master
commit 0f7163ab89cc6158dbb7a382b67da5ce200f42f1
Author: Eric Ludlam <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * test/manual/cedet/tests/: New files for semantic-utest-ia.el
    
    * test/manual/cedet/tests/test.mk,
    test/manual/cedet/tests/test.srt, test/manual/cedet/tests/test.texi,
    test/manual/cedet/tests/testlocalvars.cpp,
    test/manual/cedet/tests/teststruct.cpp,
    test/manual/cedet/tests/testtemplates.cpp,
    test/manual/cedet/tests/testusing.cpp,
    test/manual/cedet/tests/testusing.hh,
    test/manual/cedet/tests/testvarnames.java.
    test/manual/cedet/tests/testwisent.wy:
    New files to be used by test/lisp/cedet/semantic-utest-ia.el.
    Author: Eric Ludlam <address@hidden>
---
 test/manual/cedet/tests/test.mk           |  18 ++
 test/manual/cedet/tests/test.srt          |  64 ++++++++
 test/manual/cedet/tests/test.texi         |  40 +++++
 test/manual/cedet/tests/testlocalvars.cpp |  54 ++++++
 test/manual/cedet/tests/teststruct.cpp    |  86 ++++++++++
 test/manual/cedet/tests/testtemplates.cpp | 149 +++++++++++++++++
 test/manual/cedet/tests/testusing.cpp     | 265 ++++++++++++++++++++++++++++++
 test/manual/cedet/tests/testusing.hh      | 176 ++++++++++++++++++++
 test/manual/cedet/tests/testvarnames.java |  60 +++++++
 test/manual/cedet/tests/testwisent.wy     |  85 ++++++++++
 10 files changed, 997 insertions(+)

diff --git a/test/manual/cedet/tests/test.mk b/test/manual/cedet/tests/test.mk
new file mode 100644
index 0000000..edea97e
--- /dev/null
+++ b/test/manual/cedet/tests/test.mk
@@ -0,0 +1,18 @@
+# A Test Makefile. -*-makefile-*-
+
+# This test is for a file in this test directory.  Just a random one.
+FILES=testdoub # -1-
+# #1# ("testdoublens.cpp" "testdoublens.hpp" )
+
+all: optional
+
+# This one completes on a variable name.
+optional: $FIL # -2-
+       # #2# ("FILES")
+       compile $@
+
+notoptional: opt # -3-
+       # #3# ("optional")
+       echo "Done."
+
+#end
diff --git a/test/manual/cedet/tests/test.srt b/test/manual/cedet/tests/test.srt
new file mode 100644
index 0000000..b77cd4f
--- /dev/null
+++ b/test/manual/cedet/tests/test.srt
@@ -0,0 +1,64 @@
+;; test.srt --- unit test support file for semantic-utest-ia
+
+;; Copyright (C) 2008-2019 Free Software Foundation, Inc.
+
+;; Author: Eric M. Ludlam <address@hidden>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+;;
+
+set mode "c++-mode"
+set escape_start "{{"
+set escape_end "}}"
+
+context file
+
+template class :blank
+"A test template for emacs lisp"
+----
+----
+
+template classic :blank
+"A test template for emacs lisp"
+----
+----
+
+template variable :blank
+"A test template for emacs lisp"
+----
+----
+
+template function :blank
+"A test template for emacs lisp"
+----
+----
+
+template testarea :blank
+"A test template for emacs lisp"
+----
+{{<A:cla}} -1-
+        }} #1# ( "class" "classic" )
+   {{^}}
+
+{{/A}}
+----
+
+;; This is a bad hack - In order for the text to parse, but also get a 
completion
+;; monicker into the right spot, we need to pretend a comment is the same as 
the
+;; escape_end.
+;; Local variables:
+;; comment-start-skip: "}}"
+;; End:
diff --git a/test/manual/cedet/tests/test.texi 
b/test/manual/cedet/tests/test.texi
new file mode 100644
index 0000000..37d303c
--- /dev/null
+++ b/test/manual/cedet/tests/test.texi
@@ -0,0 +1,40 @@
+\input texinfo
+@setfilename test.info
+@set TITLE TEST
+@set AUTHOR Eric Ludlam
+@settitle @value{TITLE}
+
+@ifinfo
+@format
+START-INFO-DIR-ENTRY
+* test: (test).       TEST
+END-INFO-DIR-ENTRY
+@end format
+@end ifinfo
+
+@titlepage
+@sp 10
+@center @titlefont{test}
+@vskip 0pt plus 1 fill
+Copyright @copyright{} 2015 Eric Ludlam
+@end titlepage
+
+@node Top
+@top @value{TITLE}
+
+This is a simple manual filled with stuff that should test completion in 
texinfo mode.
+
+@m@c -1-
+@c #1# ( "@majorheading" "@macro" "@menu" "@multitable" )
+
+@menu
+* Index::
+@end menu
+
+
+@node Index
+@chapter Index
+
+@contents
+
+@bye
diff --git a/test/manual/cedet/tests/testlocalvars.cpp 
b/test/manual/cedet/tests/testlocalvars.cpp
new file mode 100644
index 0000000..8d22c09
--- /dev/null
+++ b/test/manual/cedet/tests/testlocalvars.cpp
@@ -0,0 +1,54 @@
+//  testlocalvars.java --- Semantic unit test for Java
+
+// Copyright (C) 2009-2019 Free Software Foundation, Inc.
+
+//  Author: Eric M. Ludlam <address@hidden>
+
+//  This file is part of GNU Emacs.
+
+//  GNU Emacs is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+
+//  GNU Emacs is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+
+//  You should have received a copy of the GNU General Public License
+//  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+
+class foo {
+  foo *member;
+  char anArray[10];
+};
+
+void func()
+{
+  foo local1;
+  foo* local2 = localvar.member;
+  foo* local3 = new foo();
+  foo local4[10];
+  char local5[5] = {'1','2','3','4','5'};
+  char *local6 = "12345";
+  char local7 = local.anArray[0];
+  char local8 = true ? 10 : 11 ;
+
+  // Check that all of the above was parsed
+  local//-1-
+    ; //#1# ("local1" "local2" "local3" "local4" "local5" "local6" "local7" 
"local8" )
+
+  local1.//-2-
+    ; //#2# ("anArray" "member")
+
+  local2->//-3-
+    ; //#3# ("anArray" "member")
+
+  local3->//-4-
+    ; //#4# ("anArray" "member")
+
+  local4[0].//-5-
+    ; //#5# ("anArray" "member")
+}
diff --git a/test/manual/cedet/tests/teststruct.cpp 
b/test/manual/cedet/tests/teststruct.cpp
new file mode 100644
index 0000000..041483d
--- /dev/null
+++ b/test/manual/cedet/tests/teststruct.cpp
@@ -0,0 +1,86 @@
+// teststruct.cpp --- semantic-ia-utest completion engine unit tests
+
+// Copyright (C) 2008-2019 Free Software Foundation, Inc.
+
+// Author: Eric M. Ludlam <address@hidden>
+
+// This file is part of GNU Emacs.
+
+// GNU Emacs is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// GNU Emacs is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+
+// Note: initially provided by by Alex Ott.
+
+template <typename DerivedT>
+struct grammar {
+public:
+  typedef grammar<DerivedT> self_t;
+  typedef DerivedT const& embed_t;
+  grammar() {}
+  ~grammar() { }
+  void use_parser() const { }
+  void test1() { }
+};
+
+struct PDFbool_parser : public grammar<PDFbool_parser> {
+  PDFbool_parser() {}
+  template <typename scannerT> struct definition {
+    typedef typename scannerT::iterator_t iterator_t;
+    int top;
+    definition(const PDFbool_parser& /*self*/) {
+      return ;
+    }
+    const int start() const {
+      return top;
+    }
+  };
+};
+
+int main(void) {
+  PDFbool_parser PDFbool_p = PDFbool_parser();
+  PDFbool_p.//-1-
+    ;
+  // #1# ("definition" "embed_t" "self_t" "test1" "use_parser")
+}
+
+// ----------------------------------------------------------------------
+
+template <class Derived> struct Base {
+public:
+  void interface()
+  {
+    // ...
+    static_cast<Derived*>(this)->implementation();
+    // ...
+  }
+
+  static void static_func()
+  {
+    // ...
+    Derived::static_sub_func();
+    // ...
+  }
+};
+
+struct Derived : Base<Derived> {
+  void implementation() { }
+  static void static_sub_func() { }
+};
+
+int foo () {
+  Derived d;
+  d.//-2-
+    ;
+  // #2# ("implementation" "interface" "static_func" "static_sub_func")
+}
diff --git a/test/manual/cedet/tests/testtemplates.cpp 
b/test/manual/cedet/tests/testtemplates.cpp
new file mode 100644
index 0000000..18ee9ec
--- /dev/null
+++ b/test/manual/cedet/tests/testtemplates.cpp
@@ -0,0 +1,149 @@
+// testtemplates.cpp --- semantic-ia-utest completion engine unit tests
+
+// Copyright (C) 2008-2019 Free Software Foundation, Inc.
+
+// Author: Eric M. Ludlam <address@hidden>
+
+// This file is part of GNU Emacs.
+
+// GNU Emacs is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// GNU Emacs is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+
+// TODO - this probably means can't be part of emacs, as I don't know who this 
guy is.
+// Written by 'Raf'
+
+template <class T, int U, class V>
+class read_ref {
+public:
+  const T* read_ref_member_one( T);
+  const V* read_ref_member_two();
+};
+
+namespace NS {
+  template <class T, int U, class V>
+  class ref {
+  public:
+    read_ref<T,10,V> operator->() {
+      m_// -1-
+       ;
+      // #1# ( "m_datas" )
+    }
+
+  private:
+    T m_datas[U];
+  };
+
+}
+
+class FooOne {
+public:
+  int fooOneMember();
+};
+
+class FooTwo {
+public:
+  int fooTwoMember();
+};
+
+class FooThree {
+public:
+  int fooThreeMember();
+
+  FooOne * operator->();
+};
+
+typedef ref<FooOne, 10,FooTwo> Test;
+
+using NS;
+
+void
+main(void) {
+  ref<FooOne, 10, FooTwo> v;
+
+  v->read_ref_member_one()-> // -2-
+    ;
+  // #2# ( "fooOneMember" )
+
+  v->read_ref_member_two()-> // -3-
+    ;
+  // #3# ( "fooTwoMember" )
+
+  v-> // -4-
+    ;
+  // #4# ( "read_ref_member_one" "read_ref_member_two" )
+
+  Test t;
+
+  t->read_ref_member_two()-> // -5-
+    ;
+  // #5# ( "fooTwoMember" )
+
+  ref<FooOne, 10, FooThree> v2;
+
+  v2->read_ref_member_two()-> // -6-
+    ;
+  // #6# ( "fooOneMember" )
+
+  /* Try all these things by also specifying the namespace in the name. */
+  NS::ref<FooOne, 10, FooTwo> v3;
+
+  v3->read_ref_member_one()-> // -7-
+    ;
+  // #7# ( "fooOneMember" )
+
+  v3->read_ref_member_two()-> // -8-
+    ;
+  // #8# ( "fooTwoMember" )
+
+  v3->read_ref_member_two// @1@ 5
+    ;
+
+}
+
+// More Namespace Magic using member constants.
+
+template<typename T>
+struct isFooLike {
+  static const bool value = false;
+};
+
+template <>
+struct isFooLike<int> {
+  static const bool value = true;
+};
+
+
+template <typename T, bool isFoo>
+class A {
+public:
+  A();
+  void foo() {};
+};
+
+
+template <typename T>
+class FooFour : public A<T, isPodLike<T>::value> {
+public:
+  bool bar() {}
+};
+
+
+int main2() {
+
+  FooFour<int> ff;
+
+  ff.// - 9- @ TODO - bring over patch from SF
+    ; // #9# ( "bar" "foo" );
+
+}
diff --git a/test/manual/cedet/tests/testusing.cpp 
b/test/manual/cedet/tests/testusing.cpp
new file mode 100644
index 0000000..1208c81
--- /dev/null
+++ b/test/manual/cedet/tests/testusing.cpp
@@ -0,0 +1,265 @@
+// testusing.cpp --- semantic-ia-utest completion engine unit tests
+
+// Copyright (C) 2008-2019 Free Software Foundation, Inc.
+
+// Author: Eric M. Ludlam <address@hidden>
+
+// This file is part of GNU Emacs.
+
+// GNU Emacs is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// GNU Emacs is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+
+#include <adstdio.h>
+
+#include <testusing.hh>
+
+namespace moose {
+
+  class MyClass;
+  class Point;
+
+  typedef MyClass snerk;
+}
+
+namespace moose {
+
+  class Point;
+  class MyClass;
+
+}
+
+namespace {
+
+  int global_variable = 0;
+
+};
+
+using moose::MyClass;
+
+void someFcn() {
+
+  MyClass f;
+
+  f.//-1-
+    ; //#1# ( "getVal" "setVal" )
+
+}
+
+// Code from Zhiqiu Kong
+
+namespace panda {
+
+  using namespace bread_name;
+
+  int func()
+  {
+    bread test;
+    test.//-2-
+      ;// #2# ( "geta" )
+    return 0;
+  }
+}
+
+namespace togglemoose {
+
+  MyOtherClass::testToggle1() { //^1^
+    // Impl for testToggle1
+  }
+}
+
+togglemoose::MyOtherClass::testToggle2() { //^3^
+  // Impl for testToggle2
+}
+
+using togglemoose;
+
+MyOtherClass::testToggle3() { //^3^
+  // Impl for testToggle3
+}
+
+// Local using statements and aliased types
+// Code from David Engster
+
+void func2()
+{
+  using namespace somestuff;
+  OneClass f;
+  f.//-3-
+    ; //#3# ( "aFunc" "anInt" )
+}
+
+void func3()
+{
+  using somestuff::OneClass;
+  OneClass f;
+  f.//-4-
+    ; //#4# ( "aFunc" "anInt" )
+}
+
+// Dereferencing alias types created through 'using' statements
+
+// Alias with fully qualified name
+void func4()
+{
+  otherstuff::OneClass f;
+  f. //-5-
+    ; //#5# ( "aFunc" "anInt" )
+}
+
+// Alias through namespace directive
+void func5()
+{
+  using namespace otherstuff;
+  OneClass f;
+  f. //-6-
+    ; //#6# ( "aFunc" "anInt" )
+}
+
+// Check name hiding
+void func6()
+{
+  using namespace morestuff;
+  OneClass f;          // Alias for somestuff::OneClass
+  f.  //-7-
+    ; //#7# ( "aFunc" "anInt" )
+  aStruct g;   // This however is morestuff::aStruct !
+  g. //-8-
+    ; //#8# ( "anotherBar" "anotherFoo" )
+}
+
+// Alias of an alias
+// Currently doesn't work interactively for some reason.
+void func6()
+{
+  using namespace evenmorestuff;
+  OneClass f;
+  f. //-7-
+    ; //#7# ( "aFunc" "anInt" )
+}
+
+// Alias for struct in nested namespace, fully qualified
+void func7()
+{
+  outer::StructNested f;
+  f.//-8-
+    ; //#8# ( "one" "two" )
+}
+
+// Alias for nested namespace
+void func8()
+{
+  using namespace outerinner;
+  StructNested f;
+  AnotherStruct g;
+  f.//-9-
+    ; //#9# ( "one" "two" )
+  g.//-10-
+    ; //#10# ( "four" "three" )
+}
+
+// Check convetional namespace aliases
+// - fully qualified -
+void func9()
+{
+  alias_for_somestuff::OneClass c;
+  c.//-11-
+    ; //#11# ( "aFunc" "anInt" )
+  alias_for_outerinner::AnotherStruct s;
+  s. //-12-
+    ; //#12# ( "four" "three" )
+}
+
+// - unqualified -
+void func10()
+{
+  using namespace alias_for_somestuff;
+  OneClass c2;
+  c2.//-13-
+    ; //#13# ( "aFunc" "anInt" )
+  using namespace alias_for_outerinner;
+  AnotherStruct s2;
+  s2.//-14-
+    ; //#14# ( "four" "three" )
+}
+
+// Completion on namespace aliases
+void func11()
+{
+   alias_for_somestuff:://-15-
+      ; //#15# ( "OneClass" "aStruct")
+   alias_for_outerinner:://-16-
+      ; //#16# ( "AnotherStruct" "StructNested" )
+}
+
+// make sure unfound using statements don't crash stuff.
+using something::cantbe::Found;
+
+void unfoundfunc()
+{
+  NotFound notfound; // Variable can't be found.
+
+  notfound.//-17-
+    ; //#17# ( )  Nothing here since this is an undefined class
+
+}
+
+// Using statements can depend on previous ones...
+
+void acc_using()
+{
+  using namespace outer;
+  // This is effectively like 'using namespace outer::inner'
+  using namespace inner;
+
+  StructNested sn;
+  sn.//-18-
+    ; //#18# ( "one" "two" )
+}
+
+// Check the same outside of function scope
+
+using namespace outer;
+using namespace inner;
+
+void acc_using2()
+{
+  StructNested sn;
+  sn.//-19-
+    ; //#19# ( "one" "two" )
+}
+
+// Check if scope gets correctly generated, i.e., without us providing any
+// hints in the form of an existing type
+
+void check_scope()
+{
+  using namespace first;
+  AAA//-20-
+    ; //#20# ( "AAA1" "AAA2" )
+}
+
+void check_scope2()
+{
+  using namespace third;
+  AAA//-21-
+    ; //#21# ( "AAA1" "AAA2" "AAA3" )
+}
+
+// Make sure this also works not only in functions
+
+namespace check_scope3 {
+  using namespace first;
+  AAA//-22-
+  ; //#22# ( "AAA1" "AAA2" )
+}
diff --git a/test/manual/cedet/tests/testusing.hh 
b/test/manual/cedet/tests/testusing.hh
new file mode 100644
index 0000000..18a33da
--- /dev/null
+++ b/test/manual/cedet/tests/testusing.hh
@@ -0,0 +1,176 @@
+// testusing.hh --- semantic-ia-utest completion engine unit tests
+
+// Copyright (C) 2008-2019 Free Software Foundation, Inc.
+
+// Author: Eric M. Ludlam <address@hidden>
+
+// This file is part of GNU Emacs.
+
+// GNU Emacs is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// GNU Emacs is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+namespace moose {
+
+  class Point;
+
+  class MyClass;
+
+}
+
+
+namespace moose {
+
+  class Point;
+
+  class MyClass {
+  public:
+    MyClass() : fVal(0) {
+    }
+
+    ~MyClass() {};
+
+    /**
+     * fVal Accessors
+     * @{
+     */
+    int getVal() const {
+      return fVal;
+    }
+    void setVal(int Val) const {
+      fVal = Val;
+    }
+    /**
+     * @}
+     */
+
+  private:
+    int fVal;
+  };
+
+}
+
+namespace togglemoose {
+
+  class MyOtherClass {
+  public:
+    int testToggle1();
+    int testToggle2();
+    int testToggle3();
+  };
+}
+
+namespace deer {
+
+  class Pickle;
+
+};
+
+// Code from Zhiqiu Kong
+
+#ifndef BREAD_H
+#define BREAD_H
+
+namespace bread_name {
+  class bread
+  {
+  public:
+    void geta();
+  private:
+    int m_a;
+    int m_b;
+  };
+}
+
+#endif
+
+// Code from David Engster
+// Creating alias types through 'using' trickery
+
+namespace somestuff {
+  class OneClass {
+  public:
+    void aFunc();
+    int anInt;
+  };
+  struct aStruct {
+    int foo;
+    int bar;
+  };
+}
+
+namespace otherstuff {
+  // make otherstuff::OneClass an alias for somestuff::OneClass
+  using somestuff::OneClass;
+}
+
+namespace morestuff {
+  // make morestuff an alias namespace for somestuff
+  using namespace somestuff;
+  // but hide aStruct with own type
+  struct aStruct {
+    int anotherFoo;
+    int anotherBar;
+  };
+}
+
+// We can also create an alias for an alias
+namespace evenmorestuff {
+  using otherstuff::OneClass;
+}
+
+// Now with nested namespaces
+namespace outer {
+  namespace inner {
+    struct StructNested {
+      int one;
+      int two;
+    };
+    struct AnotherStruct {
+      int three;
+      int four;
+    };
+  }
+}
+
+// Namespace which pulls in one of its own nested namespaces
+namespace first {
+  class AAA1;
+  namespace second {
+    class AAA2;
+  }
+  // Elevate nested namespace into first one
+  using namespace second;
+}
+
+namespace third {
+  using namespace first;
+  class AAA3;
+}
+
+
+// Elevate the first struct into 'outer'
+// so that we can access it via 'outer::StructNested'
+namespace outer {
+  using outer::inner::StructNested;
+}
+
+// Create an alias for a nested namespace
+namespace outerinner {
+  // equivalent to 'namespace outerinner = outer::inner;'
+  using namespace outer::inner;
+}
+
+// Create namespace alias
+namespace alias_for_somestuff = somestuff;
+// Same for nested namespace
+namespace alias_for_outerinner = outer::inner;
diff --git a/test/manual/cedet/tests/testvarnames.java 
b/test/manual/cedet/tests/testvarnames.java
new file mode 100644
index 0000000..217a10d
--- /dev/null
+++ b/test/manual/cedet/tests/testvarnames.java
@@ -0,0 +1,60 @@
+//  testvarnames.java --- Semantic unit test for Java
+
+// Copyright (C) 2009-2019 Free Software Foundation, Inc.
+
+//  Author: Eric M. Ludlam <address@hidden>
+
+//  This file is part of GNU Emacs.
+
+//  GNU Emacs is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+
+//  GNU Emacs is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+
+//  You should have received a copy of the GNU General Public License
+//  along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+package tests;
+
+/**
+ *
+ *
+ * Created: 02/17/14
+ *
+ * @author Eric M. Ludlam
+ * @version
+ * @since
+ */
+public class testvarnames {
+
+    public class varorclass {
+       public static long misclongvalue;
+    };
+
+    public static varorclass varoftypevarorclass = NULL;
+
+    public static long varorclass = 1;
+
+    public static long assignintovar = 1;
+
+    public static varorclass classassign = NULL;
+
+    static public void main(String [] args) {
+
+       varorclass = assign// -1-
+           // #1# ( "assignintovar" )
+           ;
+
+       varoftypevarorclass = clas// -2-
+           // #2# ( "classassign" )
+
+       varoftypevarorclass.misc//-3-
+           // #3# ( "misclongvalue" )
+    }
+
+} // testvarnames
diff --git a/test/manual/cedet/tests/testwisent.wy 
b/test/manual/cedet/tests/testwisent.wy
new file mode 100644
index 0000000..07f8637
--- /dev/null
+++ b/test/manual/cedet/tests/testwisent.wy
@@ -0,0 +1,85 @@
+;; testwisent.wy --- unit test support file for semantic-utest-ia
+
+;; Copyright (C) 2008-2019 Free Software Foundation, Inc.
+
+;; Author: Eric M. Ludlam <address@hidden>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Parser for nothing in particular mode
+
+%languagemode nothing-mode
+%parsetable    wisent-nothing-parser-tables
+%keywordtable  wisent-nothing-keywords
+%tokentable    wisent-nothing-tokens
+%languagemode  nothing-mode
+%setupfunction wisent-nothing-default-setup
+
+%start goal
+
+;;; Punctuation
+%type  <punctuation> ;;syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string
+
+%token <punctuation> DOT         "."
+%token <punctuation> COMA        ","
+%token <punctuation> COLONCOLON  "::"
+%token <punctuation> COLON       ":"
+%token <punctuation> SEMICOLON   ";"
+
+;;; KEYWORDS
+%type <keyword>
+
+%keyword COLONOSCOPY     "colonoscopy"
+%keyword SEMISOMETHING   "semisomething"
+
+%%
+
+goal
+ ;; Misc
+  : COLON ;; -1-
+ ;; #1# ( "COLONCOLON" "COLON" "COLONOSCOPY" )
+  | SEMI ;; -2-
+ ;; #2# ( "SEMI_useless_rule" "SEMICOLON" "SEMISOMETHING" )
+  | thing ;; -3-
+ ;; #3# ( "thing_term_1" "thing_term_2" )
+  ;
+
+SEMI_useless_rule
+  :
+  ;
+
+thing_term_1
+  :
+  ;
+
+thing_term_2
+  :
+  ;
+
+%%
+(define-lex wisent-nothing-lexer
+  "Lexical analyzer to handle nothing in particular buffers."
+  ;; semantic-lex-newline
+  semantic-lex-ignore-whitespace
+  semantic-lex-ignore-newline
+  semantic-lex-ignore-comments
+
+  semantic-lex-default-action
+  )
+
+;; testwisent.wy ends here
\ No newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]