diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2018-08-31 11:15:48 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2018-08-31 11:15:48 +0200 |
commit | 6f3cf12e4fb6c810ebf37c8819dc2ee39b02199e (patch) | |
tree | 32ea1de28e6303b14a007c8d9e28e57dfbc0066e /test/src | |
parent | db2fed3bdfb351c3283e481829ce687931d27a3d (diff) | |
parent | ac7936cb8f4d4d6706535bfcea0d97741c2ca15f (diff) | |
download | emacs-6f3cf12e4fb6c810ebf37c8819dc2ee39b02199e.tar.gz emacs-6f3cf12e4fb6c810ebf37c8819dc2ee39b02199e.tar.bz2 emacs-6f3cf12e4fb6c810ebf37c8819dc2ee39b02199e.zip |
Merge from origin/emacs-26
ac7936cb8f Rename thread-alive-p to thread-live-p
3d09d533d1 rcirc: Document /reconnect as a built-in command (Bug#29656)
a1e615618d * test/lisp/calc/calc-tests.el (calc-imaginary-i): New test.
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/thread-tests.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el index cc1dff8a281..a87eb3e1591 100644 --- a/test/src/thread-tests.el +++ b/test/src/thread-tests.el @@ -34,7 +34,7 @@ (declare-function mutex-lock "thread.c" (mutex)) (declare-function mutex-unlock "thread.c" (mutex)) (declare-function thread--blocker "thread.c" (thread)) -(declare-function thread-alive-p "thread.c" (thread)) +(declare-function thread-live-p "thread.c" (thread)) (declare-function thread-join "thread.c" (thread)) (declare-function thread-last-error "thread.c" (&optional cleanup)) (declare-function thread-name "thread.c" (thread)) @@ -63,11 +63,11 @@ (should (string= "hi bob" (thread-name (make-thread #'ignore "hi bob"))))) -(ert-deftest threads-alive () +(ert-deftest threads-live () "Test for thread liveness." (skip-unless (featurep 'threads)) (should - (thread-alive-p (make-thread #'ignore)))) + (thread-live-p (make-thread #'ignore)))) (ert-deftest threads-all-threads () "Simple test for all-threads." @@ -104,7 +104,7 @@ (let ((thread (make-thread #'threads-test-thread1))) (and (= (thread-join thread) 23) (= threads-test-global 23) - (not (thread-alive-p thread))))))) + (not (thread-live-p thread))))))) (ert-deftest threads-join-self () "Cannot `thread-join' the current thread." @@ -290,7 +290,7 @@ (let (th1 th2) (setq th1 (make-thread #'threads-call-error "call-error")) (should (threadp th1)) - (while (thread-alive-p th1) + (while (thread-live-p th1) (thread-yield)) (should (equal (thread-last-error) '(error "Error is called"))) @@ -319,7 +319,7 @@ (while t (thread-yield)))))) (thread-signal thread 'error nil) (sit-for 1) - (should-not (thread-alive-p thread)) + (should-not (thread-live-p thread)) (should (equal (thread-last-error) '(error))))) (ert-deftest threads-signal-main-thread () @@ -364,7 +364,7 @@ (setq new-thread (make-thread #'threads-test-condvar-wait)) ;; Make sure new-thread is alive. - (should (thread-alive-p new-thread)) + (should (thread-live-p new-thread)) (should (= (length (all-threads)) 2)) ;; Wait for new-thread to become blocked on the condvar. (while (not (eq (thread--blocker new-thread) threads-condvar)) @@ -377,7 +377,7 @@ (sleep-for 0.1) ;; Make sure the thread is still there. This used to fail due to ;; a bug in thread.c:condition_wait_callback. - (should (thread-alive-p new-thread)) + (should (thread-live-p new-thread)) (should (= (length (all-threads)) 2)) (should (eq (thread--blocker new-thread) threads-condvar)) |