]> git.eshelyaron.com Git - emacs.git/commitdiff
Move tests in cedet/semantic
authorxscript <xscript@users.sourceforge.net>
Fri, 29 Apr 2011 00:32:56 +0000 (02:32 +0200)
committerEdward John Steere <edward.steere@gmail.com>
Wed, 25 Jan 2017 15:59:25 +0000 (17:59 +0200)
test/manual/cedet/cedet/semantic/tests/scopetest.cpp [new file with mode: 0644]

diff --git a/test/manual/cedet/cedet/semantic/tests/scopetest.cpp b/test/manual/cedet/cedet/semantic/tests/scopetest.cpp
new file mode 100644 (file)
index 0000000..fd6ec6e
--- /dev/null
@@ -0,0 +1,46 @@
+/* Test scoping rules for c++ in the analyzer. */
+
+namespace {
+
+  class aclass2;  // Forward reference.
+
+  class aclass1 {
+  private:
+    int attrp1;
+    int amethodp1(int argp1);
+    aclass2 areference;
+  protected:
+    int attrpr1;
+  public:
+    int attr1;
+    int amethod1(int arg1);
+  };
+}
+
+namespace {
+  class aclass2 : public aclass1
+  {
+  private:
+    int attrp2;
+    int amethodp2(int argp1);
+  public:
+    aclass2(int aninitvalue);
+    ~aclass2();
+    int attr2;
+    int amethod2(int arg2);
+  };
+}
+
+aclass2::aclass2(init aninitvalue)
+{
+  /* This is a comment that talks about aclass1 */
+  aclass1;
+}
+
+int aclass2::amethod2(int arg2)
+{
+  int alocalvar;
+  float q;
+
+  ac;
+}