From bb711051c1c5aaa8d034fc10ec7eb41d04e797ad Mon Sep 17 00:00:00 2001 From: Rich Hickey Date: Wed, 23 Jun 2010 20:07:42 -0400 Subject: fixes for equiv compat --- src/main/clojure/clojure/contrib/pprint/column_writer.clj | 2 ++ src/main/clojure/clojure/contrib/pprint/pretty_writer.clj | 2 ++ src/test/clojure/clojure/contrib/test_jmx.clj | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/clojure/clojure/contrib/pprint/column_writer.clj b/src/main/clojure/clojure/contrib/pprint/column_writer.clj index 65b94904..63718e29 100644 --- a/src/main/clojure/clojure/contrib/pprint/column_writer.clj +++ b/src/main/clojure/clojure/contrib/pprint/column_writer.clj @@ -75,4 +75,6 @@ (.write #^Writer (get-field this :base) s)) Integer + (write-char this x) + Long (write-char this x)))))))) diff --git a/src/main/clojure/clojure/contrib/pprint/pretty_writer.clj b/src/main/clojure/clojure/contrib/pprint/pretty_writer.clj index ba9c78de..91a1bcca 100644 --- a/src/main/clojure/clojure/contrib/pprint/pretty_writer.clj +++ b/src/main/clojure/clojure/contrib/pprint/pretty_writer.clj @@ -402,6 +402,8 @@ (add-to-buffer this (make-buffer-blob s white-space oldpos newpos)))))) Integer + (write-char this x) + Long (write-char this x)))) (flush [] diff --git a/src/test/clojure/clojure/contrib/test_jmx.clj b/src/test/clojure/clojure/contrib/test_jmx.clj index 894fe158..7420316a 100644 --- a/src/test/clojure/clojure/contrib/test_jmx.clj +++ b/src/test/clojure/clojure/contrib/test_jmx.clj @@ -61,12 +61,12 @@ (are [a b] (= a b) false (jmx/raw-read mem :Verbose)) (are [type attr] (instance? type attr) - Integer (jmx/raw-read mem :ObjectPendingFinalizationCount))))) + Number (jmx/raw-read mem :ObjectPendingFinalizationCount))))) (deftest reading-attributes (testing "simple scalar attributes" (are [type attr] (instance? type attr) - Integer (jmx/read "java.lang:type=Memory" :ObjectPendingFinalizationCount))) + Number (jmx/read "java.lang:type=Memory" :ObjectPendingFinalizationCount))) (testing "composite attributes" (are [ks attr] (=set ks (keys attr)) [:used :max :init :committed] (jmx/read "java.lang:type=Memory" :HeapMemoryUsage))) @@ -172,7 +172,7 @@ (deftest test-guess-attribute-typename (are [x y] (= x (jmx/guess-attribute-typename y)) - "int" 10 +; "long" 10 "boolean" false "java.lang.String" "foo" "long" (Long/valueOf (long 10)))) -- cgit v1.2.3-18-g5258