From ffbb46849990bf4bf952e01b78c9a1a0ca0d4432 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 16 Mar 2017 12:31:07 -0400 Subject: 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. --- test/lisp/obarray-tests.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/lisp/obarray-tests.el') 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))) -- cgit v1.2.1