[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 2448a55 268/316: Fix unit testin
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 2448a55 268/316: Fix unit testing for several tests and do better error checking. |
Date: |
Fri, 27 Jan 2017 20:03:46 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 2448a55ba151f05bea77c14d58b2bf6874d2934c
Author: David Engster <address@hidden>
Commit: Edward John Steere <address@hidden>
Fix unit testing for several tests and do better error checking.
* semantic/lex-spp-utests.el (semantic-lex-spp-write-utest):
* tests/cedet-utests.el (cedet-utest-eieio-classloader): Throw
error if we cannot locate test files.
* semantic/utest-c.el (semantic-utest-c-compare)
(semantic-utest-c-conditionals):
* semantic/lex-spp-utest.el (semantic-lex-spp-write-utest): Adapt
to new directory structure and do better error checking to avoid
silent failures in the future.
---
test/manual/cedet/cedet/semantic/utest-c.el | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/test/manual/cedet/cedet/semantic/utest-c.el
b/test/manual/cedet/cedet/semantic/utest-c.el
index 0f027bf..a3f3247 100644
--- a/test/manual/cedet/cedet/semantic/utest-c.el
+++ b/test/manual/cedet/cedet/semantic/utest-c.el
@@ -49,17 +49,24 @@ The first file is full of SPP macros.
The second file is full of raw code that the macros should
expand to."
(dolist (fp semantic-utest-c-comparisons)
- (let* ((sem (locate-library "semantic"))
+ (let* ((sem (or (locate-library "cedet/semantic/utest-c")
+ (error "Cannot locate library 'cedet/semantic/utest-c'.")))
(sdir (file-name-directory sem))
+ (filename1 (expand-file-name (concat "tests/" (car fp)) sdir))
+ (filename2 (expand-file-name (concat "tests/" (cdr fp)) sdir))
(semantic-lex-c-nested-namespace-ignore-second nil)
(tags-actual
(save-excursion
- (set-buffer (find-file-noselect (expand-file-name (concat
"tests/" (car fp)) sdir)))
+ (unless (file-exists-p filename1)
+ (error "Cannot load %s." filename1))
+ (set-buffer (find-file-noselect filename1))
(semantic-clear-toplevel-cache)
(semantic-fetch-tags)))
(tags-expected
(save-excursion
- (set-buffer (find-file-noselect (expand-file-name (concat
"tests/" (cdr fp)) sdir)))
+ (unless (file-exists-p filename2)
+ (error "Cannot load %s." filename2))
+ (set-buffer (find-file-noselect filename2))
(semantic-clear-toplevel-cache)
(semantic-fetch-tags))))
;; Now that we have the tags, compare them for SPP accuracy.
@@ -85,11 +92,15 @@ those with PASS in the name will pass."
(message "\nNOTICE: XEmacs 21 doesn't support a recent enough version of
hideif to run C contional tests.\n")
(dolist (fp semantic-utest-c-conditionals)
- (let* ((sem (locate-library "semantic"))
+ (let* ((sem (or (locate-library "cedet/semantic/utest-c")
+ (error "Cannot locate library
'cedet/semantic/utest-c'.")))
(sdir (file-name-directory sem))
+ (filename (expand-file-name (concat "tests/" fp) sdir))
(semantic-lex-c-nested-namespace-ignore-second nil)
(tags-actual
(save-excursion
+ (unless (file-exists-p filename)
+ (error "Cannot load %s." filename))
(set-buffer (find-file-noselect (expand-file-name (concat
"tests/" fp) sdir)))
(semantic-clear-toplevel-cache)
(semantic-fetch-tags)))
- [Emacs-diffs] scratch/merge-cedet-tests 3651195 269/316: Added test functions, (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 3651195 269/316: Added test functions, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 2ce4443 307/316: (cit-globalref-test): Note where the test is occuring., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests b6ebafc 233/316: Added more test data, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ec14f1c 315/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 802df00 246/316: Enable global to find hh and hpp files, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 727bca8 248/316: Ensure that the correct buffer is active when, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 5cc7300 264/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 760fef4 309/316: Fix typo, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ce2952b 312/316: Revert rev. 6995, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests a25699b 222/316: semantic/bovine/c: Parse C++ override/final correctly, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 2448a55 268/316: Fix unit testing for several tests and do better error checking.,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 40f1fa1 163/316: Synchronize base 'cedet' with Emacs, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e54714f 227/316: Add header comments and provide., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests dfddc2d 262/316: (cit-make-dist): Use cit-check-compilation-for-error., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 6d5a631 277/316: Add header comments and provide., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9b917c5 152/316: Major test restructure, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c672504 249/316: etc/srecode/c.srt: New file, contents from cpp.srt, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ecb61db 211/316: New test files combining macros and EDE, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e4d6b74 280/316: Use new create functions for db tools, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 0041d52 314/316: Add header comments and provide., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 0141378 247/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/27