[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 6417bf5 279/346: d-mode-test: Stop catching excepti
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 6417bf5 279/346: d-mode-test: Stop catching exceptions |
Date: |
Sun, 29 Aug 2021 11:00:45 -0400 (EDT) |
branch: elpa/d-mode
commit 6417bf5c7a821486397c962c4d447d40603151c7
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
d-mode-test: Stop catching exceptions
This hides the actual back trace and makes debugging an unnecessary
pain.
Now that we use ert's :expected-result, this is also unnecessary.
---
d-mode-test.el | 36 +++++++++++++-----------------------
1 file changed, 13 insertions(+), 23 deletions(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index 4f37730..fbeb6a3 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -188,29 +188,19 @@
(switch-to-buffer testbuf)
(syntax-ppss (point-max))
- (condition-case err
- ;; extract the run command and expected output if any.
- (let* ((contents (buffer-substring-no-properties 1 (point-max)))
- (run-str (if (string-match "^// #run: \\(.+\\)$" contents)
- (match-string 1 contents)))
- (out-str (if (string-match "^// #out: \\(.+\\)$" contents)
- (match-string 1 contents))))
- (when run-str
- (let ((result (eval (car (read-from-string run-str)))))
- (when out-str
- (let ((expect (car (read-from-string out-str))))
- (unless (equal result expect)
- (error "\nExpected: %s\nGot : %s" expect result))))))
- t)
- (error
- (set-buffer testbuf)
- (buffer-enable-undo testbuf)
- (set-buffer-modified-p nil)
- (setq error-found-p t)
-
- (message
- "Regression found in file %s:\n%s"
- filename (error-message-string err))))
+ ;; extract the run command and expected output if any.
+ (let* ((contents (buffer-substring-no-properties 1 (point-max)))
+ (run-str (if (string-match "^// #run: \\(.+\\)$" contents)
+ (match-string 1 contents)))
+ (out-str (if (string-match "^// #out: \\(.+\\)$" contents)
+ (match-string 1 contents))))
+ (when run-str
+ (let ((result (eval (car (read-from-string run-str)))))
+ (when out-str
+ (let ((expect (car (read-from-string out-str))))
+ (unless (equal result expect)
+ (error "\nExpected: %s\nGot : %s" expect result))))))
+ t)
(set-buffer save-buf)
(goto-char save-point)
- [nongnu] elpa/d-mode 3ed3b7b 257/346: Simplify imenu testing code, (continued)
- [nongnu] elpa/d-mode 3ed3b7b 257/346: Simplify imenu testing code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode f1d37dd 263/346: Fix byte-compiled version, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 060d1f3 249/346: Fix parsing of version(...) and other non-scope blocks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2529eb2 259/346: Add a TODO, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8d30f6b 246/346: Add back the old imenu implementation for Emacs 25, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 7d39bdf 269/346: Add missing "package" keyword to c-modifier-kwds, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode ed4428c 272/346: Fix fontification of "invariant", ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 300708d 268/346: Fix imenu for template members, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 685a8cc 271/346: Expand "is" rule for other infix keyword variants and negation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 4dd90f3 277/346: Consolidate c-forward-decl-or-cast-1 "else" patch, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 6417bf5 279/346: d-mode-test: Stop catching exceptions,
ELPA Syncer <=
- [nongnu] elpa/d-mode 7c72767 280/346: d-mode-test: Fix saving results of mis-indenting tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode acaf2fb 278/346: Call d-forward-decl-or-cast-1 directly, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5abe29d 276/346: Consolidate c-forward-decl-or-cast-1 c-forward-name patch, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0cbb2ab 288/346: tests: New testcase, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e2b70b7 289/346: tests: New testcase, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c2f332e 291/346: tests: Add test for c-decl-start-kwds, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c1f5d0d 298/346: Remove a redundant (or), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b4496fc 300/346: Conditionally compile out code for newer Emacs versions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 4b3cf20 305/346: Be more restrictive when recognizing lambdas, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 6624fcb 326/346: Unbreak indentation of access labels, ELPA Syncer, 2021/08/29