Permalink
Browse files

update to latest test.generative

  • Loading branch information...
stuarthalloway committed Nov 7, 2013
1 parent 9033eaa commit 7abf4626aa30ec380a1e85eb718ad6a175b8dea4
View
@@ -57,7 +57,7 @@
<dependency>
<groupId>org.clojure</groupId>
<artifactId>test.generative</artifactId>
<version>0.1.4</version>
<version>0.5.1</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -1,15 +1,8 @@
(set! *warn-on-reflection* true)
(when-not (System/getProperty "clojure.test.generative.msec")
(System/setProperty "clojure.test.generative.msec" "30000"))
(require '[clojure.test.generative.runner :as runner])
(runner/-main "test")
(use '[clojure.test.generative])
(try
(binding [*msec* 10000]
(let [futures (test-dirs "test")]
(doseq [f futures]
@f)))
(catch Throwable t
(.printStackTrace t)
(System/exit -1))
(finally
(shutdown-agents)))
@@ -5,7 +5,7 @@
(:use [clojure.test.generative :only (defspec) :as test]
[org.fressian.test-helpers :only (assert=) :as th])
(:require [org.fressian.generators :as gen]
[clojure.test.generative.generators :as tgen]
[clojure.data.generators :as tgen]
[org.fressian.api :as fressian])
(:import [org.fressian.impl BytesOutputStream]))
@@ -38,7 +38,7 @@
(defspec fressian-int-packing
roundtrip
[^{:tag `gen/longs-near-powers-of-2} input]
[^{:tag `gen/long-near-power-of-2} input]
(assert (= input %)))
(defspec fressian-names
@@ -4,7 +4,7 @@
(ns org.fressian.generators
(:refer-clojure :exclude [symbol keyword])
(:import org.fressian.TaggedObject)
(:require [clojure.test.generative.generators :as gen]
(:require [clojure.data.generators :as gen]
[clojure.core :as core]))
(defn uuid
@@ -137,7 +137,12 @@
rules, which have boundary conditions near power-of-2 boundaries."
(->> (range 0 63)
(map #(long (Math/pow 2 %)))
(mapcat (fn [x] [(- x 2) (dec x) x (inc x) (+ x 2)]))))
(mapcat (fn [x] [(- x 2) (dec x) x (inc x) (+ x 2)]))
(into [])))
(defn long-near-power-of-2
[]
(gen/rand-nth longs-near-powers-of-2))
@@ -6,7 +6,7 @@
(:require [clojure.walk :as walk]
[clojure.java.io :as io]
[clojure.data :as data]
[clojure.test.generative.generators :as gen]
[clojure.data.generators :as gen]
[clojure.java.shell :as sh]
[org.fressian.api :as fressian])
(:import [java.io IOException Closeable]

0 comments on commit 7abf462

Please sign in to comment.