summaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/thread-tests.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el
index a00a9c84bd6..e721e0f9621 100644
--- a/test/src/thread-tests.el
+++ b/test/src/thread-tests.el
@@ -32,7 +32,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" ())
(declare-function thread-name "thread.c" (thread))
@@ -60,11 +60,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."
@@ -96,7 +96,7 @@
(let ((thread (make-thread #'threads-test-thread1)))
(thread-join thread)
(and threads-test-global
- (not (thread-alive-p thread)))))))
+ (not (thread-live-p thread)))))))
(ert-deftest threads-join-self ()
"Cannot `thread-join' the current thread."
@@ -271,7 +271,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")))
@@ -297,7 +297,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)))))
(defvar threads-condvar nil)
@@ -323,7 +323,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))
@@ -336,7 +336,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))