* test/lisp/cedet/semantic-utest: silence compiler warnings
* test/lisp/cedet/semantic-utest-c.el (semantic-test-c-preprocessor-simulation): Use with-current-buffer. * test/lisp/cedet/semantic-utest.el (semantic-utest-makebuffer): Use read-only-mode. (semantic-utest-verify-names-jave, semantic-utest-verify-names-2): Remove functions, unused.
This commit is contained in:
parent
7446e75b8b
commit
38ec422a35
2 changed files with 4 additions and 28 deletions
|
@ -49,13 +49,12 @@
|
|||
(dolist (fp semantic-utest-c-comparisons)
|
||||
(let* ((semantic-lex-c-nested-namespace-ignore-second nil)
|
||||
(tags-actual
|
||||
(save-excursion
|
||||
(set-buffer (find-file-noselect (expand-file-name (car fp) semantic-utest-c-test-directory)))
|
||||
(with-current-buffer
|
||||
(find-file-noselect (expand-file-name (car fp) semantic-utest-c-test-directory))
|
||||
(semantic-clear-toplevel-cache)
|
||||
(semantic-fetch-tags)))
|
||||
(tags-expected
|
||||
(save-excursion
|
||||
(set-buffer (find-file-noselect (expand-file-name (cdr fp) semantic-utest-c-test-directory)))
|
||||
(with-current-buffer (find-file-noselect (expand-file-name (cdr fp) semantic-utest-c-test-directory))
|
||||
(semantic-clear-toplevel-cache)
|
||||
(semantic-fetch-tags))))
|
||||
(when (or (not tags-expected) (not tags-actual))
|
||||
|
|
|
@ -492,7 +492,7 @@ Pre-fill the buffer with CONTENTS."
|
|||
(set-buffer buff)
|
||||
(setq buffer-offer-save nil)
|
||||
(font-lock-mode -1) ;; Font lock has issues in Emacs 23
|
||||
(toggle-read-only -1) ;; In case /tmp doesn't exist.
|
||||
(read-only-mode -1) ;; In case /tmp doesn't exist
|
||||
(erase-buffer)
|
||||
(insert contents)
|
||||
;(semantic-fetch-tags) ;JAVE could this go here?
|
||||
|
@ -724,29 +724,6 @@ JAVE this thing would need to be recursive to handle java and csharp"
|
|||
(semantic-utest-taglists-equivalent-p table names skipnames)
|
||||
))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; JAVE redefine a new validation function
|
||||
; is not quite as good as the old one yet
|
||||
(defun semantic-utest-verify-names-jave (name-contents &optional skipnames)
|
||||
"JAVE version of `semantic-utest-verify-names'.
|
||||
NAME-CONTENTS is a sample of the tags buffer to test against.
|
||||
SKIPNAMES is a list of names to remove from NAME-CONTENTS"
|
||||
(assert (semantic-utest-verify-names-2 name-contents (semantic-fetch-tags))
|
||||
nil "failed test")
|
||||
)
|
||||
|
||||
(defun semantic-utest-verify-names-2 (l1 l2)
|
||||
(cond ( (and (consp l1) (equal (car l1) 'overlay))
|
||||
(overlayp l2))
|
||||
((not (consp l1))
|
||||
(equal l1 l2))
|
||||
((consp l1)
|
||||
(and (semantic-utest-verify-names-2 (car l1) (car l2)) (semantic-utest-verify-names-2 (cdr l1) (cdr l2))))
|
||||
(t (error "internal error"))))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;;; Kill indicator line
|
||||
;;
|
||||
|
|
Loading…
Add table
Reference in a new issue