diff options
| author | Michael Albinus | 2018-07-13 14:28:12 +0200 |
|---|---|---|
| committer | Michael Albinus | 2018-07-13 14:28:12 +0200 |
| commit | 17ebb6e5ae9cdd2586d1b4d6f2347ae09c6f653f (patch) | |
| tree | 71c40c7f31201944097804ca85f88dca94d6c0d5 /test/src | |
| parent | 1c862297e4ad50b14f246fca724e148538e7421b (diff) | |
| download | emacs-17ebb6e5ae9cdd2586d1b4d6f2347ae09c6f653f.tar.gz emacs-17ebb6e5ae9cdd2586d1b4d6f2347ae09c6f653f.zip | |
Use consistent function names in thread-tests.el
* test/src/thread-tests.el (threads-call-error, threads-custom)
(threads-errors, threads-sticky-point, threads-signal-early):
Rename, using naming convention to prefix with "threads-".
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/thread-tests.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el index 3c7fde33d8f..a00a9c84bd6 100644 --- a/test/src/thread-tests.el +++ b/test/src/thread-tests.el | |||
| @@ -253,31 +253,32 @@ | |||
| 253 | (string= "hi bob" | 253 | (string= "hi bob" |
| 254 | (condition-name (make-condition-variable (make-mutex) | 254 | (condition-name (make-condition-variable (make-mutex) |
| 255 | "hi bob"))))) | 255 | "hi bob"))))) |
| 256 | (defun call-error () | 256 | |
| 257 | (defun threads-call-error () | ||
| 257 | "Call `error'." | 258 | "Call `error'." |
| 258 | (error "Error is called")) | 259 | (error "Error is called")) |
| 259 | 260 | ||
| 260 | ;; This signals an error internally; the error should be caught. | 261 | ;; This signals an error internally; the error should be caught. |
| 261 | (defun thread-custom () | 262 | (defun threads-custom () |
| 262 | (defcustom thread-custom-face 'highlight | 263 | (defcustom threads-custom-face 'highlight |
| 263 | "Face used for thread customizations." | 264 | "Face used for thread customizations." |
| 264 | :type 'face | 265 | :type 'face |
| 265 | :group 'widget-faces)) | 266 | :group 'widget-faces)) |
| 266 | 267 | ||
| 267 | (ert-deftest thread-errors () | 268 | (ert-deftest threads-errors () |
| 268 | "Test what happens when a thread signals an error." | 269 | "Test what happens when a thread signals an error." |
| 269 | (skip-unless (featurep 'threads)) | 270 | (skip-unless (featurep 'threads)) |
| 270 | (let (th1 th2) | 271 | (let (th1 th2) |
| 271 | (setq th1 (make-thread #'call-error "call-error")) | 272 | (setq th1 (make-thread #'threads-call-error "call-error")) |
| 272 | (should (threadp th1)) | 273 | (should (threadp th1)) |
| 273 | (while (thread-alive-p th1) | 274 | (while (thread-alive-p th1) |
| 274 | (thread-yield)) | 275 | (thread-yield)) |
| 275 | (should (equal (thread-last-error) | 276 | (should (equal (thread-last-error) |
| 276 | '(error "Error is called"))) | 277 | '(error "Error is called"))) |
| 277 | (setq th2 (make-thread #'thread-custom "thread-custom")) | 278 | (setq th2 (make-thread #'threads-custom "threads-custom")) |
| 278 | (should (threadp th2)))) | 279 | (should (threadp th2)))) |
| 279 | 280 | ||
| 280 | (ert-deftest thread-sticky-point () | 281 | (ert-deftest threads-sticky-point () |
| 281 | "Test bug #25165 with point movement in cloned buffer." | 282 | "Test bug #25165 with point movement in cloned buffer." |
| 282 | (skip-unless (featurep 'threads)) | 283 | (skip-unless (featurep 'threads)) |
| 283 | (with-temp-buffer | 284 | (with-temp-buffer |
| @@ -288,7 +289,7 @@ | |||
| 288 | (sit-for 1) | 289 | (sit-for 1) |
| 289 | (should (= (point) 21)))) | 290 | (should (= (point) 21)))) |
| 290 | 291 | ||
| 291 | (ert-deftest thread-signal-early () | 292 | (ert-deftest threads-signal-early () |
| 292 | "Test signaling a thread as soon as it is started by the OS." | 293 | "Test signaling a thread as soon as it is started by the OS." |
| 293 | (skip-unless (featurep 'threads)) | 294 | (skip-unless (featurep 'threads)) |
| 294 | (let ((thread | 295 | (let ((thread |