[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: |
Fri, 27 Jan 2017 20:03:28 +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 47d9c79 295/316: Moved tests about, (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 47d9c79 295/316: Moved tests about, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests f8e3bbc 311/316: Return fully qualified types if necessary., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 19646a7 141/316: semantic/bovine/c: Add support for typedef references, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 39f1464 235/316: (cit-srecode-fill-cpp): Fixed misspelling of target name., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests fb048d1 006/316: (semantic-c): Hack for Emacs 21 to get things running., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c43f15e 015/316: Test project configuration file., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 23862f3 023/316: Test friends, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests cdcc2c4 037/316: (Lisp_LISP): Add cit-dist.el, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests bf84fd5 054/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests dbed2db 058/316: Run the tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests cfdd9a5 070/316: Tests for polymorphism,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 41aebbc 072/316: Texinfo support for cedet integration tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 79008df 084/316: Fake config.h for project detection purposes., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 0c4deea 079/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests b666682 082/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 89b52b8 087/316: New metaproject, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 6dfcb31 089/316: (Lisp): Add cit-srec.el (templates): New, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 96526d7 096/316: (Lisp): Add cit-uml.el (Misc): Add cit-uml.cgr, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 74de67a 105/316: Move Speedbar development to Emacs trunk., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ee352df 113/316: How to use the cit-test.sh script., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests f580185 118/316: Expand preprocessor to handle macros which open or close scope., Edward John Steere, 2017/01/27