summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward John Steere <edward.steere@gmail.com>2017-01-28 15:19:29 +0200
committerEdward John Steere <edward.steere@gmail.com>2017-01-28 15:19:29 +0200
commitb6e82486ce426181925d0901f8bdf16b948cdb3e (patch)
tree9769769a66117457cde8d347a8eadd5464fe9c90
parent3cc63e2b32845e62848cbe724d380f737726d491 (diff)
downloademacs-scratch/merge-cedet-tests.tar.gz
Fix ia-utest, add missing includes and add missing test resourcesscratch/merge-cedet-tests
Some more stragglers which were missed during the merge along with fixes which allow the tests to run. * test/manual/cedet/cedet-utests.el: (semantic/fw) new require. (semantic/wisent/calc) deleted require. (cedet-utest-test-alist) removed compdb test. * test/manual/cedet/cedet/ede/detect-utest.el: (ede-detect-linux-utest) added function from CEDET. * test/manual/cedet/cedet/semantic/ia-utest.el: (semantic-ia-utest-buffer) Fixed setq form for regex-p and regex-a which were accidentally broken during merging. * test/manual/cedet/cedet/ede/src/proj/Project.ede: * test/manual/cedet/cedet/ede/src/proj/TEST: * test/manual/cedet/cedet/ede/src/proj/sub/Project.ede: * test/manual/cedet/cedet/semantic/tests/test-fmt.el: Added missing test resources from CEDET
-rw-r--r--test/manual/cedet/cedet-utests.el3
-rw-r--r--test/manual/cedet/cedet/ede/detect-utest.el4
-rw-r--r--test/manual/cedet/cedet/ede/src/proj/Project.ede11
-rw-r--r--test/manual/cedet/cedet/ede/src/proj/TEST1
-rw-r--r--test/manual/cedet/cedet/ede/src/proj/sub/Project.ede11
-rw-r--r--test/manual/cedet/cedet/semantic/ia-utest.el10
-rw-r--r--test/manual/cedet/cedet/semantic/tests/test-fmt.el65
7 files changed, 98 insertions, 7 deletions
diff --git a/test/manual/cedet/cedet-utests.el b/test/manual/cedet/cedet-utests.el
index 80f4259e17a..76f09d04079 100644
--- a/test/manual/cedet/cedet-utests.el
+++ b/test/manual/cedet/cedet-utests.el
@@ -29,6 +29,7 @@
(require 'cedet-uutil)
(require 'inversion-utest)
(require 'pulse-utest)
+(require 'semantic/fw)
(require 'cedet-files-utests)
(require 'cedet/ede/detect-utest)
(require 'cedet/ede/secure-utest)
@@ -41,7 +42,6 @@
(require 'cedet/semantic/utest-fw)
(require 'cedet/semantic/gcc-utest)
(require 'cedet/semantic/fmt-utest)
-(require 'semantic/wisent/calc)
(require 'cedet/srecode/test)
(require 'cedet/srecode/fields-utest)
(require 'cedet/srecode/test-getset)
@@ -82,7 +82,6 @@
("ede: project detection tests" . ede-detect-utest) ;; NOTE: must be before other EDE tests.
("ede: project detect linux extra" . ede-detect-linux-utest)
("ede: security tests" . ede-security-utest)
- ("ede: compdb project tests" . compdb-utest)
;;
;; SEMANTIC
diff --git a/test/manual/cedet/cedet/ede/detect-utest.el b/test/manual/cedet/cedet/ede/detect-utest.el
index 6aaf9cb6fb3..41f5158d7e0 100644
--- a/test/manual/cedet/cedet/ede/detect-utest.el
+++ b/test/manual/cedet/cedet/ede/detect-utest.el
@@ -319,6 +319,10 @@ Optional FLAG is for re-running a subset of tests with an alternate config."
(format "%s Failures found." (length errlog))))
))))
+(defun ede-detect-linux-utest ()
+ "Extra tests similar to ede-detect-utest, but by specifying a linux build dir."
+ (ede-detect-utest 'linux))
+
(defun ede-detect-utest-loop (test-entries FLAG)
"Test the primary EDE project types."
(save-excursion
diff --git a/test/manual/cedet/cedet/ede/src/proj/Project.ede b/test/manual/cedet/cedet/ede/src/proj/Project.ede
new file mode 100644
index 00000000000..0e22374699f
--- /dev/null
+++ b/test/manual/cedet/cedet/ede/src/proj/Project.ede
@@ -0,0 +1,11 @@
+;; Object proj
+;; EDE Project Files are auto generated: Do Not Edit
+(ede-proj-project "proj"
+ :file "Project.ede"
+ :name "proj"
+ :targets
+ (list
+ (ede-proj-target-makefile-miscelaneous "misc"
+ :name "misc"
+ :path ""
+ :source '("TEST"))))
diff --git a/test/manual/cedet/cedet/ede/src/proj/TEST b/test/manual/cedet/cedet/ede/src/proj/TEST
new file mode 100644
index 00000000000..3b12464976a
--- /dev/null
+++ b/test/manual/cedet/cedet/ede/src/proj/TEST
@@ -0,0 +1 @@
+TEST \ No newline at end of file
diff --git a/test/manual/cedet/cedet/ede/src/proj/sub/Project.ede b/test/manual/cedet/cedet/ede/src/proj/sub/Project.ede
new file mode 100644
index 00000000000..0af91d4a8fd
--- /dev/null
+++ b/test/manual/cedet/cedet/ede/src/proj/sub/Project.ede
@@ -0,0 +1,11 @@
+;; Object proj
+;; EDE Project Files are auto generated: Do Not Edit
+(ede-proj-project "proj"
+ :file "Project.ede"
+ :name "proj"
+ :targets
+ (list
+ (ede-proj-target-makefile-miscelaneous "max"
+ :name "max"
+ :path ""
+ :source '("TEST"))))
diff --git a/test/manual/cedet/cedet/semantic/ia-utest.el b/test/manual/cedet/cedet/semantic/ia-utest.el
index f8a64e4a30c..6de2f141ec6 100644
--- a/test/manual/cedet/cedet/semantic/ia-utest.el
+++ b/test/manual/cedet/cedet/semantic/ia-utest.el
@@ -192,10 +192,10 @@ If the error occurs w/ a C or C++ file, rethrow the error."
)
;; Keep looking for test points until we run out.
(while (save-excursion
- (setq regex-p ((concat "\\(" comment-start-skip "\\)\\s-*-"
- (number-to-string idx) "-" )
- regex-a (concat "\\(" comment-start-skip "\\)\\s-*#"
- (number-to-string idx) "#" ))
+ (setq regex-p (concat "\\(" comment-start-skip "\\)\\s-*-"
+ (number-to-string idx) "-" )
+ regex-a (concat "\\(" comment-start-skip "\\)\\s-*#"
+ (number-to-string idx) "#" ))
(goto-char (point-min))
(save-match-data
(when (re-search-forward regex-p nil t)
@@ -256,7 +256,7 @@ If the error occurs w/ a C or C++ file, rethrow the error."
(semantic-ia-utest-log " Unit tests (completions) passed (%d total)"
(- idx 1)))
- )))
+ ))
(defun semantic-ia-utest-buffer-refs ()
"Run a analyze-refs unit-test pass in the current buffer."
diff --git a/test/manual/cedet/cedet/semantic/tests/test-fmt.el b/test/manual/cedet/cedet/semantic/tests/test-fmt.el
new file mode 100644
index 00000000000..2aac20a4885
--- /dev/null
+++ b/test/manual/cedet/cedet/semantic/tests/test-fmt.el
@@ -0,0 +1,65 @@
+;;; test-fmt.el ---
+;;
+;; Copyright (C) 2012 Eric M. Ludlam
+;;
+;; Author: Eric M. Ludlam <eric@siege-engine.com>
+;;
+;; 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.
+
+;;; Commentary:
+;;
+;;
+
+;;; Code:
+(require 'semantic)
+;;
+;; ## name "semantic"
+;; ## abbreviate "semantic<>"
+;; ## summarize "Requires: semantic"
+
+(defun test-fmt-1 (a)
+ "Function with 1 arg.")
+;;
+;; ## name "test-fmt-1"
+;; ## abbreviate "(test-fmt-1)"
+;; ## summarize "Defuns: (test-fmt-1 a)"
+;; ## short-doc "Function with 1 arg."
+;; ## uml-prototype "(test-fmt-1 a)" <-- That is probably wrong.
+
+(defvar test-fmt-var nil
+ "Variable test.")
+;;
+;; ## name "test-fmt-var"
+;; ## abbreviate "test-fmt-var"
+;; ## summarize "Variables: test-fmt-var"
+;; ## short-doc "Variable test."
+;; ## uml-prototype "test-fmt-var"
+
+(defclass test-fmt-class ()
+ ((slot1 :initarg :slot1))
+ "Class for testing.")
+;;
+;; ## name "test-fmt-class"
+;; ## abbreviate "test-fmt-class{}"
+;; ## summarize "Types: class test-fmt-class {}"
+;; ## short-doc "Class for testing."
+;; ## uml-prototype "class test-fmt-class {}"
+
+
+
+(provide 'test-fmt)
+
+;;; test-fmt.el ends here