aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward John Steere2017-01-28 15:19:29 +0200
committerEdward John Steere2017-01-28 15:19:29 +0200
commitb6e82486ce426181925d0901f8bdf16b948cdb3e (patch)
tree9769769a66117457cde8d347a8eadd5464fe9c90
parent3cc63e2b32845e62848cbe724d380f737726d491 (diff)
downloademacs-scratch/merge-cedet-tests.tar.gz
emacs-scratch/merge-cedet-tests.zip
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 @@
29(require 'cedet-uutil) 29(require 'cedet-uutil)
30(require 'inversion-utest) 30(require 'inversion-utest)
31(require 'pulse-utest) 31(require 'pulse-utest)
32(require 'semantic/fw)
32(require 'cedet-files-utests) 33(require 'cedet-files-utests)
33(require 'cedet/ede/detect-utest) 34(require 'cedet/ede/detect-utest)
34(require 'cedet/ede/secure-utest) 35(require 'cedet/ede/secure-utest)
@@ -41,7 +42,6 @@
41(require 'cedet/semantic/utest-fw) 42(require 'cedet/semantic/utest-fw)
42(require 'cedet/semantic/gcc-utest) 43(require 'cedet/semantic/gcc-utest)
43(require 'cedet/semantic/fmt-utest) 44(require 'cedet/semantic/fmt-utest)
44(require 'semantic/wisent/calc)
45(require 'cedet/srecode/test) 45(require 'cedet/srecode/test)
46(require 'cedet/srecode/fields-utest) 46(require 'cedet/srecode/fields-utest)
47(require 'cedet/srecode/test-getset) 47(require 'cedet/srecode/test-getset)
@@ -82,7 +82,6 @@
82 ("ede: project detection tests" . ede-detect-utest) ;; NOTE: must be before other EDE tests. 82 ("ede: project detection tests" . ede-detect-utest) ;; NOTE: must be before other EDE tests.
83 ("ede: project detect linux extra" . ede-detect-linux-utest) 83 ("ede: project detect linux extra" . ede-detect-linux-utest)
84 ("ede: security tests" . ede-security-utest) 84 ("ede: security tests" . ede-security-utest)
85 ("ede: compdb project tests" . compdb-utest)
86 85
87 ;; 86 ;;
88 ;; SEMANTIC 87 ;; 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."
319 (format "%s Failures found." (length errlog)))) 319 (format "%s Failures found." (length errlog))))
320 )))) 320 ))))
321 321
322(defun ede-detect-linux-utest ()
323 "Extra tests similar to ede-detect-utest, but by specifying a linux build dir."
324 (ede-detect-utest 'linux))
325
322(defun ede-detect-utest-loop (test-entries FLAG) 326(defun ede-detect-utest-loop (test-entries FLAG)
323 "Test the primary EDE project types." 327 "Test the primary EDE project types."
324 (save-excursion 328 (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 @@
1;; Object proj
2;; EDE Project Files are auto generated: Do Not Edit
3(ede-proj-project "proj"
4 :file "Project.ede"
5 :name "proj"
6 :targets
7 (list
8 (ede-proj-target-makefile-miscelaneous "misc"
9 :name "misc"
10 :path ""
11 :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 @@
1;; Object proj
2;; EDE Project Files are auto generated: Do Not Edit
3(ede-proj-project "proj"
4 :file "Project.ede"
5 :name "proj"
6 :targets
7 (list
8 (ede-proj-target-makefile-miscelaneous "max"
9 :name "max"
10 :path ""
11 :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."
192 ) 192 )
193 ;; Keep looking for test points until we run out. 193 ;; Keep looking for test points until we run out.
194 (while (save-excursion 194 (while (save-excursion
195 (setq regex-p ((concat "\\(" comment-start-skip "\\)\\s-*-" 195 (setq regex-p (concat "\\(" comment-start-skip "\\)\\s-*-"
196 (number-to-string idx) "-" ) 196 (number-to-string idx) "-" )
197 regex-a (concat "\\(" comment-start-skip "\\)\\s-*#" 197 regex-a (concat "\\(" comment-start-skip "\\)\\s-*#"
198 (number-to-string idx) "#" )) 198 (number-to-string idx) "#" ))
199 (goto-char (point-min)) 199 (goto-char (point-min))
200 (save-match-data 200 (save-match-data
201 (when (re-search-forward regex-p nil t) 201 (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."
256 (semantic-ia-utest-log " Unit tests (completions) passed (%d total)" 256 (semantic-ia-utest-log " Unit tests (completions) passed (%d total)"
257 (- idx 1))) 257 (- idx 1)))
258 258
259 ))) 259 ))
260 260
261(defun semantic-ia-utest-buffer-refs () 261(defun semantic-ia-utest-buffer-refs ()
262 "Run a analyze-refs unit-test pass in the current buffer." 262 "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 @@
1;;; test-fmt.el ---
2;;
3;; Copyright (C) 2012 Eric M. Ludlam
4;;
5;; Author: Eric M. Ludlam <eric@siege-engine.com>
6;;
7;; This program is free software; you can redistribute it and/or
8;; modify it under the terms of the GNU General Public License as
9;; published by the Free Software Foundation; either version 2, or (at
10;; your option) any later version.
11
12;; This program is distributed in the hope that it will be useful, but
13;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15;; General Public License for more details.
16
17;; You should have received a copy of the GNU General Public License
18;; along with this program; see the file COPYING. If not, write to
19;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20;; Boston, MA 02110-1301, USA.
21
22;;; Commentary:
23;;
24;;
25
26;;; Code:
27(require 'semantic)
28;;
29;; ## name "semantic"
30;; ## abbreviate "semantic<>"
31;; ## summarize "Requires: semantic"
32
33(defun test-fmt-1 (a)
34 "Function with 1 arg.")
35;;
36;; ## name "test-fmt-1"
37;; ## abbreviate "(test-fmt-1)"
38;; ## summarize "Defuns: (test-fmt-1 a)"
39;; ## short-doc "Function with 1 arg."
40;; ## uml-prototype "(test-fmt-1 a)" <-- That is probably wrong.
41
42(defvar test-fmt-var nil
43 "Variable test.")
44;;
45;; ## name "test-fmt-var"
46;; ## abbreviate "test-fmt-var"
47;; ## summarize "Variables: test-fmt-var"
48;; ## short-doc "Variable test."
49;; ## uml-prototype "test-fmt-var"
50
51(defclass test-fmt-class ()
52 ((slot1 :initarg :slot1))
53 "Class for testing.")
54;;
55;; ## name "test-fmt-class"
56;; ## abbreviate "test-fmt-class{}"
57;; ## summarize "Types: class test-fmt-class {}"
58;; ## short-doc "Class for testing."
59;; ## uml-prototype "class test-fmt-class {}"
60
61
62
63(provide 'test-fmt)
64
65;;; test-fmt.el ends here