[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 6b4b0a5 078/316: Move tests in c
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 6b4b0a5 078/316: Move tests in cedet/semantic |
Date: |
Sat, 28 Jan 2017 09:09:49 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 6b4b0a58ca01d426f8c567ce76bb6d73a49f1e84
Author: xscript <address@hidden>
Commit: Edward John Steere <address@hidden>
Move tests in cedet/semantic
---
.../cedet/cedet/semantic/tests/testpolymorph.cpp | 131 ++++++++++++++++++++
1 file changed, 131 insertions(+)
diff --git a/test/manual/cedet/cedet/semantic/tests/testpolymorph.cpp
b/test/manual/cedet/cedet/semantic/tests/testpolymorph.cpp
new file mode 100644
index 0000000..ddf67d0
--- /dev/null
+++ b/test/manual/cedet/cedet/semantic/tests/testpolymorph.cpp
@@ -0,0 +1,131 @@
+/** testpolymorph.cpp --- A sequence of polymorphism examples.
+ *
+ * Copyright (C) 2009 Eric M. Ludlam
+ *
+ * Author: Eric M. Ludlam <address@hidden>
+ * X-RCS: $Id: testpolymorph.cpp,v 1.2 2009-09-02 13:55:46 davenar Exp $
+ *
+ * This program 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 2, or (at
+ * your option) any later version.
+ *
+ * This program 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 this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <cmath>
+
+// Test 1 - Functions w/ prototypes
+namespace proto {
+
+ int pt_func1(int arg1);
+ int pt_func1(int arg1) {
+ return 0;
+ }
+
+}
+
+// Test 2 - Functions w/ different arg lists.
+namespace fcn_poly {
+
+ int pm_func(void) {
+ return 0;
+ }
+ int pm_func(int a) {
+ return a;
+ }
+ int pm_func(char a) {
+ return int(a);
+ }
+ int pm_func(double a) {
+ return int(floor(a));
+ }
+
+}
+
+// Test 3 - Methods w/ differet arg lists.
+class meth_poly {
+public:
+ int pm_meth(void) {
+ return 0;
+ }
+ int pm_meth(int a) {
+ return a;
+ }
+ int pm_meth(char a) {
+ return int(a);
+ }
+ int pm_meth(double a) {
+ return int(floor(a));
+ }
+
+};
+
+// Test 4 - Templates w/ partial specifiers.
+namespace template_partial_spec {
+ template <typename T> class test
+ {
+ public:
+ void doSomething(T t) { };
+ };
+
+ template <typename T> class test<T *>
+ {
+ public:
+ void doSomething(T* t) { };
+ };
+}
+
+// Test 5 - Templates w/ full specicialization which may or may not share
+// common functions.
+namespace template_full_spec {
+ template <typename T> class test
+ {
+ public:
+ void doSomething(T t) { };
+ void doSomethingElse(T t) { };
+ };
+
+ template <> class test<int>
+ {
+ public:
+ void doSomethingElse(int t) { };
+ void doSomethingCompletelyDifferent(int t) { };
+ };
+}
+
+// Test 6 - Dto., but for templates with multiple parameters.
+namespace template_multiple_spec {
+ template <typename T1, typename T2> class test
+ {
+ public:
+ void doSomething(T1 t) { };
+ void doSomethingElse(T2 t) { };
+ };
+
+ template <typename T2> class test<int, T2>
+ {
+ public:
+ void doSomething(int t) { };
+ void doSomethingElse(T2 t) { };
+ };
+
+ template <> class test<float, int>
+ {
+ public:
+ void doSomething(float t) { };
+ void doSomethingElse(int t) { };
+ void doNothing(void) { };
+ };
+}
+
+
+// End of polymorphism test file.
- [Emacs-diffs] scratch/merge-cedet-tests 6f0f898 065/316: * cedet-load.el: Load cogre autoloads., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 6f0f898 065/316: * cedet-load.el: Load cogre autoloads., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d8f7f9c 066/316: * tests/cit-test.sh: Fix filename for integration test., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 8e1fe2d 067/316: Accept any potential project directory during testing, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 83c8dc0 068/316: Use random temporary directory for integration tests, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 217feb1 080/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests cfdd9a5 070/316: Tests for polymorphism, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests dd9777f 076/316: Fix interactive unit tests., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 3730a42 069/316: New include for cpproot test that is in a subdirectory., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 4ec19b7 083/316: Test src file for a dirmatch., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests b666682 082/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 6b4b0a5 078/316: Move tests in cedet/semantic,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests e20716d 097/316: ("Lisp"): Added cogre as an aux package., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 30a0375 099/316: ("cit"): Add cit-dist.el, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 85a3b5a 106/316: (cit): Add "cit-projvar.el"., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 74de67a 105/316: Move Speedbar development to Emacs trunk., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 41aebbc 072/316: Texinfo support for cedet integration tests., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 4fe7a1c 085/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 89b52b8 087/316: New metaproject, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 6dfcb31 089/316: (Lisp): Add cit-srec.el (templates): New, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 79008df 084/316: Fake config.h for project detection purposes., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 7f97008 102/316: (Lisp): Add cit-android.el, Edward John Steere, 2017/01/28