File tree Expand file tree Collapse file tree
Clojure.Tests/clojure/test_clojure Expand file tree Collapse file tree Original file line number Diff line number Diff line change 361361
362362(def framework-description System.Runtime.InteropServices.RuntimeInformation /FrameworkDescription )
363363
364+ (defn- parse-version-string [^String s]
365+ (let [[major minor build] (.Split s (char-array [\.]))]
366+ {:major (when major (Int32/Parse ^String major))
367+ :minor (when minor (Int32/Parse ^String minor))
368+ :incremental (when build (Int32/Parse ^String build))}))
369+
364370(defn- parse-framework-description []
365371 (let [^String descr framework-description
366372 prefixes '(( ".NET Framework " :framework) (" .NET Native " :native) (" .NET Core " :core) (" .NET " :dotnet))
367- try-parse (fn [[^String s k]] (when (.StartsWith descr s) [k (.Substring descr (.Length s))]))]
373+ try-parse (fn [[^String s k]] (when (.StartsWith descr s) [k (parse-version-string ( .Substring descr (.Length s) ))]))]
368374 (some try-parse prefixes)))
369375
370376(def dotnet-platform (first (parse-framework-description)))
Original file line number Diff line number Diff line change 7171 Math /PI )
7272
7373
74- (compile-when (>= (.CompareTo ^String dotnet-version " 5 " ) 0 )
74+ (compile-when (>= (:major dotnet-version) 5 )
7575
7676(def
7777 ^{:doc " Constant for tau, the number of radians in one turn.
506506
507507) ; ; compile-when
508508
509- (compile-when (>= (.CompareTo ^String dotnet-version " 6 " ) 0 )
509+ (compile-when (>= (:major dotnet-version) 6 )
510510
511511(defn reciprocal-estimate
512512 {:doc " Returns an estimate of the reciprocal of a specified number.
Original file line number Diff line number Diff line change 16401640 (cycle [1 ])
16411641 (repeat 1 )))
16421642
1643- (compile-when (>= (.CompareTo dotnet-version " 6 " ) 0 )
1643+ (compile-when (>= (:major dotnet-version) 6 )
16441644(defspec iteration-seq-equals-reduce 1000
16451645 (prop/for-all [initk gen/int
16461646 seed gen/int]
You can’t perform that action at this time.
0 commit comments