diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2017-03-16 12:31:07 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2017-03-16 12:31:07 -0400 |
commit | ffbb46849990bf4bf952e01b78c9a1a0ca0d4432 (patch) | |
tree | ab2d6dbd1f93e8c42a8508342abfb379a4a14d9f /test/lisp/obarray-tests.el | |
parent | 265a5d9791bf42da0bab7bdbef4352e8d734ef31 (diff) | |
download | emacs-ffbb46849990bf4bf952e01b78c9a1a0ca0d4432.tar.gz emacs-ffbb46849990bf4bf952e01b78c9a1a0ca0d4432.tar.bz2 emacs-ffbb46849990bf4bf952e01b78c9a1a0ca0d4432.zip |
Add obarray-size and fix tests accordingly. Use obarrayp in cedet.
* lisp/obarray.el (obarray-size): New function.
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-symbol)
(semantic-lex-spp-save-table, semantic-lex-spp-macros):
* lisp/cedet/semantic/bovine/c.el (semantic-c-describe-environment):
Use obarrayp.
* test/lisp/obarray-tests.el (obarray-make-default-test)
(obarray-make-with-size-test): Use it.
Diffstat (limited to 'test/lisp/obarray-tests.el')
-rw-r--r-- | test/lisp/obarray-tests.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/lisp/obarray-tests.el b/test/lisp/obarray-tests.el index 9a2d65d8b41..4908b883240 100644 --- a/test/lisp/obarray-tests.el +++ b/test/lisp/obarray-tests.el @@ -43,14 +43,16 @@ (ert-deftest obarray-make-default-test () (let ((table (obarray-make))) (should (obarrayp table)) - (should (equal (make-vector 59 0) table)))) + (should (eq (obarray-size table) obarray-default-size)))) (ert-deftest obarray-make-with-size-test () + ;; FIXME: Actually, `wrong-type-argument' is not the right error to signal, + ;; so we shouldn't enforce this misbehavior in tests! (should-error (obarray-make -1) :type 'wrong-type-argument) (should-error (obarray-make 0) :type 'wrong-type-argument) (let ((table (obarray-make 1))) (should (obarrayp table)) - (should (equal (make-vector 1 0) table)))) + (should (eq (obarray-size table) 1)))) (ert-deftest obarray-get-test () (let ((table (obarray-make 3))) |