File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/test/clojure/clojure/core/async Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ ; ; Copyright (c) Rich Hickey and contributors. All rights reserved.
2+ ; ; The use and distribution terms for this software are covered by the
3+ ; ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4+ ; ; which can be found in the file epl-v10.html at the root of this distribution.
5+ ; ; By using this software in any fashion, you are agreeing to be bound by
6+ ; ; the terms of this license.
7+ ; ; You must not remove this notice, or any other, from this software.
8+
9+ (ns clojure.core.async.flow-test
10+ (:require [clojure.test :refer :all ]
11+ [clojure.core.async.flow :as flow]))
12+
13+ (deftest test-futurize
14+ (testing " "
15+ (let [es (reify java.util.concurrent.ExecutorService
16+ (^java.util.concurrent.Future submit [_ ^Callable f]
17+ (future-call (comp vector f))))]
18+ (is (= 16 @((flow/futurize #(* % %) {:exec :mixed }) 4 )))
19+ (is (= 16 @((flow/futurize #(* % %)) 4 )))
20+ (is (= [16 ] @((flow/futurize #(* % %) {:exec es}) 4 ))))))
21+
You can’t perform that action at this time.
0 commit comments