[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests ceb9293 130/316: Move tests in c
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests ceb9293 130/316: Move tests in cedet/semantic |
Date: |
Sat, 28 Jan 2017 09:09:54 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit ceb9293fb83677dc3351a68eb42994d5265d439e
Author: xscript <address@hidden>
Commit: Edward John Steere <address@hidden>
Move tests in cedet/semantic
---
.../cedet/cedet/semantic/tests/teststruct.cpp | 66 ++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/test/manual/cedet/cedet/semantic/tests/teststruct.cpp
b/test/manual/cedet/cedet/semantic/tests/teststruct.cpp
new file mode 100644
index 0000000..6bc27b9
--- /dev/null
+++ b/test/manual/cedet/cedet/semantic/tests/teststruct.cpp
@@ -0,0 +1,66 @@
+// Combinations of templates and structure inheritance.
+//
+// Created 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")
+}
- [Emacs-diffs] scratch/merge-cedet-tests f300a36 100/316: (Lisp): Add cit-symref.el., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests f300a36 100/316: (Lisp): Add cit-symref.el., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 007464d 104/316: (cit/Lisp): Add cit-projvar.el, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests a6f2191 103/316: (Lisp): Add cit-arduino, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 302b4d7 107/316: eieio: Move to obsolete and use the one that ships with Emacs, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ee352df 113/316: How to use the cit-test.sh script., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests f91e2ce 114/316: New pretend system include for cpproot test., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d2dcc15 112/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 34041d4 120/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d08bd3b 117/316: C/C++: Fix function pointer parsing, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 3a7b458 110/316: Fixes for security tests, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ceb9293 130/316: Move tests in cedet/semantic,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 6d9366a 135/316: Make 'this' a pointer., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests fb82965 136/316: Test `this' from in inline member functions, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 64c305b 137/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests c132878 122/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 0897a28 127/316: Test file for Project.ede proj., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests f3a937b 143/316: Test project file., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 876d3e9 138/316: New EDE project for testing dirmatch features., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 8900419 148/316: Added arduino project detection, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 19ff260 128/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests cd08101 179/316: Added cit uml, Edward John Steere, 2017/01/28