aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/json-tests.el
diff options
context:
space:
mode:
authorPhilipp Stephani2018-09-21 21:50:56 +0200
committerPhilipp Stephani2018-09-21 21:50:56 +0200
commit9f10e1a0eef0dd5572a34a76617d50df0e3dd357 (patch)
treea6e60eb393bc4e00ef74e83bcf1601a8e40461e8 /test/src/json-tests.el
parent7f3877e83405a089b580fe9d0342dc0b6c08cbfc (diff)
downloademacs-9f10e1a0eef0dd5572a34a76617d50df0e3dd357.tar.gz
emacs-9f10e1a0eef0dd5572a34a76617d50df0e3dd357.zip
Support bignums when serializing JSON
* src/json.c (lisp_to_json): Support bignums. * test/src/json-tests.el (json-serialize/bignum): New test.
Diffstat (limited to 'test/src/json-tests.el')
-rw-r--r--test/src/json-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/json-tests.el b/test/src/json-tests.el
index 8bd679b886e..911bc49730d 100644
--- a/test/src/json-tests.el
+++ b/test/src/json-tests.el
@@ -278,5 +278,13 @@ Test with both unibyte and multibyte strings."
278 :type 'no-catch) 278 :type 'no-catch)
279 (should (equal calls 1))))) 279 (should (equal calls 1)))))
280 280
281(ert-deftest json-serialize/bignum ()
282 (skip-unless (fboundp 'json-serialize))
283 (should (equal (json-serialize (vector (1+ most-positive-fixnum)
284 (1- most-negative-fixnum)))
285 (format "[%d,%d]"
286 (1+ most-positive-fixnum)
287 (1- most-negative-fixnum)))))
288
281(provide 'json-tests) 289(provide 'json-tests)
282;;; json-tests.el ends here 290;;; json-tests.el ends here