aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-07-22 11:08:53 +0200
committerAndrea Corallo2020-01-01 11:33:56 +0100
commit1b72dad74f2e193e8da8de58ef8c46341897269a (patch)
tree3fadf5eb5311e50ef332cb831b0edee8d79cc2d9 /test/src
parent8b22849a5cef3e81e8b81cf7f32c186471607e06 (diff)
downloademacs-1b72dad74f2e193e8da8de58ef8c46341897269a.tar.gz
emacs-1b72dad74f2e193e8da8de58ef8c46341897269a.zip
catch works
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-tests.el23
1 files changed, 11 insertions, 12 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 871dede23a6..ed3a9b2f9d0 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -448,26 +448,25 @@
448 (error-message-string err) 448 (error-message-string err)
449 " catched")))) 449 " catched"))))
450 450
451 ;; (defun comp-tests-catch-f (f) 451 (defun comp-tests-catch-f (f)
452 ;; (catch 'foo 452 (catch 'foo
453 ;; (funcall f))) 453 (funcall f)))
454 454
455 ;; (defun comp-tests-throw-f (x) 455 (defun comp-tests-throw-f (x)
456 ;; (throw 'foo x)) 456 (throw 'foo x))
457 457
458 (native-compile #'comp-tests-condition-case-0-f) 458 (native-compile #'comp-tests-condition-case-0-f)
459 (native-compile #'comp-tests-condition-case-1-f) 459 (native-compile #'comp-tests-condition-case-1-f)
460 ;; (native-compile #'comp-tests-catch-f) 460 (native-compile #'comp-tests-catch-f)
461 ;; (native-compile #'comp-tests-throw-f) 461 (native-compile #'comp-tests-throw-f)
462 462
463 (should (string= (comp-tests-condition-case-0-f) 463 (should (string= (comp-tests-condition-case-0-f)
464 "arith-error Arithmetic error catched")) 464 "arith-error Arithmetic error catched"))
465 (should (string= (comp-tests-condition-case-1-f) 465 (should (string= (comp-tests-condition-case-1-f)
466 "error foo catched"))) 466 "error foo catched"))
467 ;; (should (= (comp-tests-catch-f (lambda () (throw 'foo 3))) 3)) 467 (should (= (comp-tests-catch-f (lambda () (throw 'foo 3))) 3))
468 ;; (should (= (catch 'foo 468 (should (= (catch 'foo
469 ;; (comp-tests-throw-f 3)))) 469 (comp-tests-throw-f 3))))))
470 )
471 470
472(ert-deftest comp-tests-gc () 471(ert-deftest comp-tests-gc ()
473 "Try to do some longer computation to let the gc kick in." 472 "Try to do some longer computation to let the gc kick in."