[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests dacde10 013/316: Fix unit testin
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests dacde10 013/316: Fix unit testing for several tests and do better error checking. |
Date: |
Sat, 28 Jan 2017 09:09:42 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit dacde104b09fee00255fc8a85e25e0e111017d8f
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/lex-spp-utest.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/test/manual/cedet/cedet/semantic/lex-spp-utest.el
b/test/manual/cedet/cedet/semantic/lex-spp-utest.el
index 9721d6a..8ecfcfb 100644
--- a/test/manual/cedet/cedet/semantic/lex-spp-utest.el
+++ b/test/manual/cedet/cedet/semantic/lex-spp-utest.el
@@ -34,15 +34,17 @@
(defun semantic-lex-spp-write-utest ()
"Unit test using the test spp file to test the slot write fcn."
(interactive)
- (let* ((sem (locate-library "semantic/lex-spp.el"))
- (dir (file-name-directory sem)))
- (save-excursion
- (set-buffer (find-file-noselect
- (expand-file-name "tests/testsppreplace.c"
+ (let* ((sem (or (locate-library "cedet/semantic/lex-spp-utest.el")
+ (error "Could not locate library
'cedet/semantic/lex-spp-utest.el'.")))
+ (dir (file-name-directory sem))
+ (filename (expand-file-name "tests/testsppreplace.c"
dir)))
+ (save-excursion
+ (unless (file-exists-p filename)
+ (error "Could not find file %s." filename))
+ (set-buffer (find-file-noselect filename))
(semantic-lex-spp-write-test))))
-
(provide 'cedet/semantic/lex-spp-utest)
;;; lex-spp-utest.el ends here
- [Emacs-diffs] branch scratch/merge-cedet-tests created (now 3cc63e2), Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 413871b 003/316: (cit-src-dir): New var., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests dacde10 013/316: Fix unit testing for several tests and do better error checking.,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 3b92d1c 021/316: Fake lisp.h for project detection purposes., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests b6765ec 001/316: New test file., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests a020f37 004/316: (inhibit-splash-screen): Set this., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 322251e 005/316: Disable semanticdb-file saving. Disable srecode map saving., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 167edac 002/316: Test system load file., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 46053c1 010/316: Don't init semantic mode at this point, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 692209d 011/316: Disable saving EDE's cache file., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests fb048d1 006/316: (semantic-c): Hack for Emacs 21 to get things running., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests c43f15e 015/316: Test project configuration file., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 026efb3 008/316: First changes to make them work., Edward John Steere, 2017/01/28