[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 3cb2319 243/316: Added code for
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 3cb2319 243/316: Added code for test tags |
Date: |
Fri, 27 Jan 2017 20:03:44 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 3cb2319f1af642b792807289a76eb046fe9d70d6
Author: zappo <address@hidden>
Commit: Edward John Steere <address@hidden>
Added code for test tags
* test/manual/cedet/cit-cpp.el: (cit-header-cpp-tags): Add some code
to foo constructor. (cit-src-cpp-tags): Add stdio.h include. Add code
to the methods to call through the class and eventually print
MOOSE. (cit-main-cpp-tags): Remove stdio.h include. Replace print
code with call to the foo class to print
MOOSE. (cit-symref-operations): New variable.
(cit-remove-add-to-project-cpp): Delete .o files also.
(cit-remove-and-do-shared-lib): Specify the compiler to use.
---
test/manual/cedet/cit-cpp.el | 50 +++++++++++++++++++++++++++++++++---------
1 file changed, 40 insertions(+), 10 deletions(-)
diff --git a/test/manual/cedet/cit-cpp.el b/test/manual/cedet/cit-cpp.el
index 0d8b537..168ffd6 100644
--- a/test/manual/cedet/cit-cpp.el
+++ b/test/manual/cedet/cit-cpp.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2008, 2009, 2010 Eric M. Ludlam
;; Author: Eric M. Ludlam <address@hidden>
-;; X-RCS: $Id: cit-cpp.el,v 1.9 2010-03-16 03:05:27 zappo Exp $
+;; X-RCS: $Id: cit-cpp.el,v 1.10 2010-04-18 00:37:06 zappo Exp $
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
@@ -35,7 +35,8 @@
(semantic-tag-new-function
"foo" '("foo" type (:type "class"))
(list (semantic-tag-new-variable "f" "int"))
- :constructor-flag t)
+ :constructor-flag t
+ :code " Field1 = f; ")
(semantic-tag-new-function
"foo" "void" nil :destructor-flag t )
(semantic-tag-new-function
@@ -70,6 +71,7 @@
(defvar cit-src-cpp-tags
(list
+ (semantic-tag-new-include "stdio.h" nil)
(semantic-tag-new-include "foo.hh" nil)
(semantic-tag-new-function
"doSomethingPublic" "void"
@@ -77,38 +79,54 @@
(semantic-tag-new-variable "thing" "char"
nil
:pointer 1))
- :parent "foo")
+ :parent "foo"
+ :code " setField1(1);
+ if(getField1() == 1) {
+ // Call doSomethingProtected <== multi-hit for grep, not for global.
+ doSomethingProtected(ctxt,thing);
+ }\n")
(semantic-tag-new-function
"setField1" "void"
(list (semantic-tag-new-variable "f" "int"))
- :parent "foo")
+ :parent "foo"
+ :code " Field1 = f;\n")
(semantic-tag-new-function
"getField1" "int" nil
- :parent "foo")
+ :parent "foo"
+ :code " return Field1;\n")
(semantic-tag-new-function
"doSomethingProtected" "void"
(list (semantic-tag-new-variable "ctxt" "int")
(semantic-tag-new-variable "thing" "char"
nil
:pointer 1))
- :parent "foo")
+ :parent "foo"
+ :code " printf(\"%s\\n\",thing);\n")
)
"Tags to be inserted into a source file.")
(defvar cit-main-cpp-tags
(list
- (semantic-tag-new-include "stdio.h" nil)
(semantic-tag-new-include "foo.hh" nil)
+ (semantic-tag-new-include "string.h" nil)
(semantic-tag-new-function
"main" "int"
(list (semantic-tag-new-variable "argc" "int")
(semantic-tag-new-variable "argv" "char"
nil
:pointer 2 ))
- :code " printf(\"MOOSE\\n\");\n")
+ :code " foo myFoo(2);
+ char *myStr = strdup(\"MOOSE\");
+ myFoo.doSomethingPublic(1,myStr);
+")
)
"Tags to be inserted into main.")
+(defvar cit-symref-operations
+ '( "doSomethingProtected" "renameSomething" )
+ "A set of symref operations based on the tags defined here.
+The symref test (in cit-symref.el) will use these operations
+to test they symbol reference system in C++.")
(defun cit-srecode-fill-cpp (make-type)
"Fill up a base set of files with some base tags.
@@ -142,7 +160,7 @@ MAKE-TYPE is the type of make process to use."
;; 1 g) build the sources.
(cit-compile-and-wait)
- ;; 1 g.1) Run the compiled program.
+ ;; 1 g.1) Run the compiled program. (Test for MOOSE output.)
(find-file (cit-file "src/main.cpp"))
(cit-run-target "./Prog")
)
@@ -156,6 +174,7 @@ Argument MAKE-TYPE is the type of make project to create."
(ede-remove-file t)
(kill-buffer (current-buffer))
(delete-file (cit-file "src/bar.cpp"))
+ (delete-file (cit-file "src/bar.o"))
;; Create a new shared lib target, and add bar.cpp to it.
(find-file (cit-file "lib/bar.cpp"))
@@ -163,6 +182,10 @@ Argument MAKE-TYPE is the type of make project to create."
(ede-new make-type "Libs")
(ede-new-target "testlib" "sharedobject" "n")
(ede-add-file "testlib")
+ (let ((mt ede-object))
+ (oset mt :compiler 'ede-g++-libtool-shared-compiler)
+ (oset mt :linker 'ede-g++-linker-libtool)
+ )
;; 1 g) build the sources.
;; Direct compile to test that make fails properly.
@@ -178,7 +201,14 @@ Argument MAKE-TYPE is the type of make project to create."
(oset p :variables '( ( "CPPFLAGS" . "-I../include") )))
(ede-commit-project p)
)
-
+ ;; Flip back over to main, and add our new testlib.
+ (find-file (cit-file "src/main.cpp"))
+ (let ((mt ede-object))
+ (if (string= make-type "Automake")
+ (oset mt :ldlibs '("../lib/libtestlib.la"))
+ ;; FIX THIS
+ (oset mt :ldflags '("../lib/bar.o"));;HACK for libtool!
+ ))
(cit-compile-and-wait)
)
- [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/27
- [Emacs-diffs] scratch/merge-cedet-tests d08bd3b 117/316: C/C++: Fix function pointer parsing, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests cd08101 179/316: Added cit uml, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e96e309 178/316: Added new subdir and ensure that the base dir, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 765b8f9 208/316: (cedet-utest-test-alist): Add ede-detect-linux-utest., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests de289a9 189/316: Compare Code And Documtation For Tags, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 7177e01 210/316: Add compdb EDE project, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 284144e 154/316: Fixes for test execution, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests fd40e7f 212/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 404d4da 242/316: Improve compilation active detection, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 3cb2319 243/316: Added code for test tags,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 05006be 049/316: Semantic Symref testing., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 614a6bb 044/316: Synchronize base 'cedet/ede' with Emacs, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests dbfb320 057/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/27
- [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/27
- [Emacs-diffs] scratch/merge-cedet-tests 573b4a5 059/316: Remove more temporary directories, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 3730a42 069/316: New include for cpproot test that is in a subdirectory., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 4131d23 046/316: Fix typo in last commit., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 6a63635 090/316: ("ede-proj-project"): Add scripts/cit-test.sh, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e20716d 097/316: ("Lisp"): Added cogre as an aux package., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 68ea5e3 098/316: (Lisp): Use preload compiler., Edward John Steere, 2017/01/27