-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
95 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). | ||
## [0.2.0]((https://github.com/slipset/speculative/releases/tag/v0.0.1)) (2018-11-09) | ||
|
||
## [Unreleased] | ||
### Changed | ||
- Add a new arity to `make-widget-async` to provide a different widget shape. | ||
* Specs for `=`, `/`, `apply` (clj only), `assoc`, `count`, `every?`, `filter`, | ||
`first`, `get`, `juxt`, `not-any?`, `not-every?`, `range`, `partial`, | ||
`remove`, `reset!`, `swap!`, `some`, `some?` and `str`. | ||
|
||
* Test tools namespace `speculative.test` around `clojure.spec.test.alpha`. See | ||
[here](doc/test.md). | ||
|
||
## [0.1.1] - 2018-10-20 | ||
### Changed | ||
- Documentation on how to make the widgets. | ||
## [0.1.0](https://github.com/slipset/speculative/releases/tag/v0.0.1) (2018-10-20) | ||
|
||
### Removed | ||
- `make-widget-sync` - we're all async, all the time. | ||
|
||
### Fixed | ||
- Fixed widget maker to keep working when daylight savings switches over. | ||
|
||
## 0.1.0 - 2018-10-20 | ||
### Added | ||
- Files from the new template. | ||
- Widget maker public API - `make-widget-sync`. | ||
|
||
[Unreleased]: https://github.com/your-name/speculative/compare/0.1.1...HEAD | ||
[0.1.1]: https://github.com/your-name/speculative/compare/0.1.0...0.1.1 | ||
* Initial release with specs for `map`, `filter`, `merge`, `merge-with`, `fnil` | ||
and `reduce`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
## Test tools | ||
|
||
Namespace `speculative.test` provides macros and functions that are used in the | ||
tests for speculative, but may also come in handy in other projects. | ||
|
||
``` clojure | ||
$ clj -Sdeps '{:deps {net.cgrand/macrovich {:mvn/version "0.2.1"}}}' | ||
Clojure 1.10.0-RC1 | ||
|
||
user=> (require '[speculative.test :refer [check | ||
with-instrumentation | ||
gentest | ||
successful?]]) | ||
nil | ||
|
||
user=> (require '[clojure.spec.alpha :as s]) | ||
nil | ||
|
||
user=> (s/fdef foo | ||
:args (s/cat :n number?) | ||
:ret number?) | ||
user/foo | ||
|
||
user=> (defn foo [n] | ||
"ret") | ||
#'user/foo | ||
|
||
user=> (check `foo [1]) | ||
Evaluation error - invalid arguments to null at clojure.spec.test.alpha/explain-check (alpha.clj:278). | ||
"ret" - failed: number? at: [:ret] | ||
|
||
user=> (s/fdef foo | ||
:args (s/cat :n number?) | ||
:ret string?) | ||
user/foo | ||
|
||
user=> (check `foo [1]) | ||
"ret" | ||
|
||
user=> (with-instrumentation `foo | ||
(foo "a")) | ||
Evaluation error - invalid arguments to user/foo at (NO_SOURCE_FILE:15). | ||
"a" - failed: number? at: [:n] | ||
|
||
user=> (foo "a") | ||
"ret" | ||
|
||
user=> (gentest `foo nil {:num-tests 1}) | ||
generatively testing user/foo | ||
({:spec #object[clojure.spec.alpha$fspec_impl$reify__2524 0x72bd06ca "clojure.spec.alpha$fspec_impl$reify__2524@72bd06ca"], :clojure.spec.test.check/ret {:result true, :pass? true, :num-tests 1, :time-elapsed-ms 1, :seed 1541249961647}, :sym user/foo}) | ||
|
||
user=> (successful? *1) | ||
true | ||
|
||
user=> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters