aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Petton2015-11-11 18:09:42 +0100
committerNicolas Petton2015-11-11 18:09:42 +0100
commit23036bac7d470397f364d02eb992d701f1ebab4b (patch)
treebb21bbf4afe84cb764565be006ef9084768d5a4a
parent20aea4293439281570c5c05d3f54bc5b261a4d0f (diff)
downloademacs-23036bac7d470397f364d02eb992d701f1ebab4b.tar.gz
emacs-23036bac7d470397f364d02eb992d701f1ebab4b.zip
Rename obarray-p to obarrayp
* lisp/obarray.el (obarrayp): New name. * test/automated/obarray-tests.el: Update the tests.
-rw-r--r--lisp/obarray.el2
-rw-r--r--test/automated/obarray-tests.el22
2 files changed, 12 insertions, 12 deletions
diff --git a/lisp/obarray.el b/lisp/obarray.el
index 0e57381a9c5..bf8bb3ee2ca 100644
--- a/lisp/obarray.el
+++ b/lisp/obarray.el
@@ -37,7 +37,7 @@
37 (make-vector size 0) 37 (make-vector size 0)
38 (signal 'wrong-type-argument '(size 0))))) 38 (signal 'wrong-type-argument '(size 0)))))
39 39
40(defun obarray-p (object) 40(defun obarrayp (object)
41 "Return t if OBJECT is an obarray." 41 "Return t if OBJECT is an obarray."
42 (and (vectorp object) 42 (and (vectorp object)
43 (< 0 (length object)))) 43 (< 0 (length object))))
diff --git a/test/automated/obarray-tests.el b/test/automated/obarray-tests.el
index 97df3b3b6a6..4cc61b6903f 100644
--- a/test/automated/obarray-tests.el
+++ b/test/automated/obarray-tests.el
@@ -26,30 +26,30 @@
26(require 'obarray) 26(require 'obarray)
27(require 'ert) 27(require 'ert)
28 28
29(ert-deftest obarray-p-test () 29(ert-deftest obarrayp-test ()
30 "Should assert that given object is an obarray." 30 "Should assert that given object is an obarray."
31 (should-not (obarray-p 42)) 31 (should-not (obarrayp 42))
32 (should-not (obarray-p "aoeu")) 32 (should-not (obarrayp "aoeu"))
33 (should-not (obarray-p '())) 33 (should-not (obarrayp '()))
34 (should-not (obarray-p [])) 34 (should-not (obarrayp []))
35 (should (obarray-p (make-vector 7 0)))) 35 (should (obarrayp (make-vector 7 0))))
36 36
37(ert-deftest obarray-p-unchecked-content-test () 37(ert-deftest obarrayp-unchecked-content-test ()
38 "Should fail to check content of passed obarray." 38 "Should fail to check content of passed obarray."
39 :expected-result :failed 39 :expected-result :failed
40 (should-not (obarray-p ["a" "b" "c"])) 40 (should-not (obarrayp ["a" "b" "c"]))
41 (should-not (obarray-p [1 2 3]))) 41 (should-not (obarrayp [1 2 3])))
42 42
43(ert-deftest obarray-make-default-test () 43(ert-deftest obarray-make-default-test ()
44 (let ((table (obarray-make))) 44 (let ((table (obarray-make)))
45 (should (obarray-p table)) 45 (should (obarrayp table))
46 (should (equal (make-vector 59 0) table)))) 46 (should (equal (make-vector 59 0) table))))
47 47
48(ert-deftest obarray-make-with-size-test () 48(ert-deftest obarray-make-with-size-test ()
49 (should-error (obarray-make -1) :type 'wrong-type-argument) 49 (should-error (obarray-make -1) :type 'wrong-type-argument)
50 (should-error (obarray-make 0) :type 'wrong-type-argument) 50 (should-error (obarray-make 0) :type 'wrong-type-argument)
51 (let ((table (obarray-make 1))) 51 (let ((table (obarray-make 1)))
52 (should (obarray-p table)) 52 (should (obarrayp table))
53 (should (equal (make-vector 1 0) table)))) 53 (should (equal (make-vector 1 0) table))))
54 54
55(ert-deftest obarray-get-test () 55(ert-deftest obarray-get-test ()