[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests cfdd9a5 070/316: Tests for polym
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests cfdd9a5 070/316: Tests for polymorphism |
Date: |
Sat, 28 Jan 2017 09:09:49 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit cfdd9a5446a71facdab4a04ea856d325b11e407a
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>
Tests for polymorphism
* test/manual/cedet/cedet/semantic/tests/testpoly.cpp
Tests for polymorphism with a couple examples where we could try to
disambiguate.
---
.../manual/cedet/cedet/semantic/tests/testpoly.cpp | 59 ++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/test/manual/cedet/cedet/semantic/tests/testpoly.cpp
b/test/manual/cedet/cedet/semantic/tests/testpoly.cpp
new file mode 100644
index 0000000..769a5be
--- /dev/null
+++ b/test/manual/cedet/cedet/semantic/tests/testpoly.cpp
@@ -0,0 +1,59 @@
+// Test disambiguation of polymorphic methods.
+
+class xx {
+public:
+ int int_field;
+ int char_field;
+ char foo(char x);
+ int foo (int x);
+};
+
+int whatever() {
+ xx x;
+
+ char same_char;
+ int same_int;
+ int i;
+ char c;
+
+ i = x.foo(same // -1-
+ // #1# ( "same_int" )
+ );
+
+ c = x.foo(same // -2-
+ // #2# ( "same_char" )
+ );
+
+}
+
+// Example from Dmitry
+struct foo {
+ int a;
+ int b;
+};
+
+struct bar {
+ int c;
+ int d;
+};
+
+foo tee(int i) {
+ foo f;
+ return f;
+}
+
+bar tee(long i) {
+ bar b;
+ return b;
+}
+
+int main() {
+ int i = 1;
+ long l = 2;
+
+ tee(i).//-3-
+ ; // #3# ( "a" "b" )
+
+ tee(l).//-4-
+ ; // #4# ( "c" "d" )
+}
- [Emacs-diffs] scratch/merge-cedet-tests 541cc30 053/316: (cpprootsys.h, projincmacros.h): New includes (projmacro_a): New fcn., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 541cc30 053/316: (cpprootsys.h, projincmacros.h): New includes (projmacro_a): New fcn., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 2cfef8f 048/316: Add test files, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 573b4a5 059/316: Remove more temporary directories, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests b76efc7 062/316: Determine the STYLE of test to run. If none passed in, use Make., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d4d1014 061/316: Add -f toggle-debug-on-quit flag, Edward John Steere, 2017/01/28
- [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 <=
- [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, 2017/01/28
- [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