diff options
| author | Stefan Monnier | 2017-03-16 12:31:07 -0400 |
|---|---|---|
| committer | Stefan Monnier | 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.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 @@ | |||
| 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 (obarrayp table)) | 45 | (should (obarrayp table)) |
| 46 | (should (equal (make-vector 59 0) table)))) | 46 | (should (eq (obarray-size table) obarray-default-size)))) |
| 47 | 47 | ||
| 48 | (ert-deftest obarray-make-with-size-test () | 48 | (ert-deftest obarray-make-with-size-test () |
| 49 | ;; FIXME: Actually, `wrong-type-argument' is not the right error to signal, | ||
| 50 | ;; so we shouldn't enforce this misbehavior in tests! | ||
| 49 | (should-error (obarray-make -1) :type 'wrong-type-argument) | 51 | (should-error (obarray-make -1) :type 'wrong-type-argument) |
| 50 | (should-error (obarray-make 0) :type 'wrong-type-argument) | 52 | (should-error (obarray-make 0) :type 'wrong-type-argument) |
| 51 | (let ((table (obarray-make 1))) | 53 | (let ((table (obarray-make 1))) |
| 52 | (should (obarrayp table)) | 54 | (should (obarrayp table)) |
| 53 | (should (equal (make-vector 1 0) table)))) | 55 | (should (eq (obarray-size table) 1)))) |
| 54 | 56 | ||
| 55 | (ert-deftest obarray-get-test () | 57 | (ert-deftest obarray-get-test () |
| 56 | (let ((table (obarray-make 3))) | 58 | (let ((table (obarray-make 3))) |