File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 333333#?(:cljs (deftest local-interop-test
334334 (is (= 1 (tu/eval* " (let [j #js {:a (fn [] 1)}] (j.a))" nil )))))
335335
336- ( deftest type-hint-test
337- ( testing " string type hints "
338- ( is ( string? ( sci/eval-string " (defn read- string [^ \" [B \" v] (String. v)) (read-string \" 1 \" ) " ))))
339- ( testing " type hinting with runnable returns nil on futuretask get "
340- #?( :clj
336+ #?( :clj
337+ ( deftest type-hint-test
338+ ( testing " string type hints "
339+ ( is ( string? ( sci/eval-string " (defn read-string [^ \" [B \" v] (String. v)) (read-string \" 1 \" ) " ))))
340+ ( testing " type hinting with runnable returns nil on futuretask get "
341341 (let [config {:classes {'java.util.concurrent.Executors java.util.concurrent.Executors 'java.util.concurrent.ThreadPoolExecutor java.util.concurrent.ThreadPoolExecutor 'java.util.concurrent.Callable java.util.concurrent.Callable 'java.util.concurrent.FutureTask java.util.concurrent.FutureTask 'java.lang.Runnable java.lang.Runnable}}]
342- (is (nil? (sci/eval-string " (def fut (let [^java.lang.Runnable f (fn [] 3)] (.submit (java.util.concurrent.Executors/newCachedThreadPool) f))) (.get fut)" config))))))
343- (testing " type hinting with callable returns nil on futuretask get"
344- #?(:clj
342+ (is (nil? (sci/eval-string " (def fut (let [^java.lang.Runnable f (fn [] 3)] (.submit (java.util.concurrent.Executors/newCachedThreadPool) f))) (.get fut)" config)))))
343+ (testing " type hinting with callable returns nil on futuretask get"
345344 (let [config {:classes {'java.util.concurrent.Executors java.util.concurrent.Executors 'java.util.concurrent.ThreadPoolExecutor java.util.concurrent.ThreadPoolExecutor 'java.util.concurrent.Callable java.util.concurrent.Callable 'java.util.concurrent.FutureTask java.util.concurrent.FutureTask 'java.lang.Runnable java.lang.Runnable}}]
346345 (is (= 3 (sci/eval-string " (def fut (let [^java.util.concurrent.Callable f (fn [] 3)] (.submit (java.util.concurrent.Executors/newCachedThreadPool) f))) (.get fut)" config)))))))
You can’t perform that action at this time.
0 commit comments