[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: |
Sat, 28 Jan 2017 09:10:10 +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 e9c9716 279/316: Fixes for external db tests, (continued)
- [Emacs-diffs] scratch/merge-cedet-tests e9c9716 279/316: Fixes for external db tests, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests e0d3d7b 303/316: New tests., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ec14f1c 315/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests c2f09c4 182/316: (cedet-integ-test-proj): Add cit-remove-and-do-shared-lib., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 63dbe0c 276/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 9480090 261/316: Test updating the project version, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests e78d9b8 201/316: Fix merge error in unit tests., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 8989dc6 313/316: New Tests for ede-java-root-project type., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests c89acc2 305/316: Add test code for use with sources in globalref, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 9b72617 282/316: Don't set :filename if it's already set, Edward John Steere, 2017/01/28
- [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 6adc6be 266/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 3cb2319 243/316: Added code for test tags, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 101da66 306/316: Don't scan other files because Util.cc is already in a buffer, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 3cc63e2 316/316: Remove tests and redundant resources not destined for merge, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d8c1209 234/316: CPP integration support. Core bits copied originally from cedet-integ-test.el, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 82586cd 209/316: eieio: Move to obsolete and use the one that ships with Emacs, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests e54714f 227/316: Add header comments and provide., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 4730d02 197/316: Refactor tests, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 82a840d 244/316: Use ldflags and libs for in project libraries, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests cb8b935 245/316: (cit-remove-and-do-shared-lib): Add ldlibs-local test., Edward John Steere, 2017/01/28