-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cljs tests for map, make reader cross-platform
Change the map-test namespace to `cljc`, several sections are still marked as clj-only, because they rely on eval, hashCode, compact, or transient-map. I made some adjustments to the cljs implementation in the process to make it better match the clj version.
- Loading branch information
Showing
10 changed files
with
168 additions
and
113 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
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,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
[ -d node_modules/ws ] || npm install ws | ||
|
||
clojure -A:test -M -m kaocha.runner "$@" |
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,4 +1,7 @@ | ||
{:paths ["src"], | ||
:deps {org.clojure/clojure {:mvn/version "1.10.3"}}, | ||
{:paths ["src" "resources"] | ||
:deps {org.clojure/clojure {:mvn/version "1.10.3"}} | ||
:aliases | ||
{:test {:extra-paths ["test"]}}} | ||
{:test {:extra-paths ["test"] | ||
:extra-deps {lambdaisland/kaocha {:mvn/version "RELEASE"} | ||
lambdaisland/kaocha-cljs {:mvn/version "RELEASE"} | ||
org.clojure/clojurescript {:mvn/version "RELEASE"}}}}} |
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
{ordered/set flatland.ordered.set/into-ordered-set | ||
ordered/map flatland.ordered.map/ordered-map-reader} |
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
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
(ns flatland.ordered.performance-test | ||
(:use clojure.test)) | ||
|
||
(deftest reflection | ||
#_ (binding [*warn-on-reflection* true] | ||
(are [ns-sym] (= "" | ||
(with-out-str | ||
(binding [*err* *out*] | ||
(require :reload ns-sym)))) | ||
;; Order of the below is IMPORTANT. set depends on map, and if you | ||
;; reload map *after* reloading set, then set refers to classes that | ||
;; don't exist anymore, and all kinds of bad stuff happens | ||
;; (in this test and others) | ||
'ordered.map 'ordered.set))) | ||
(deftest ^:kaocha/pending reflection | ||
#_(binding [*warn-on-reflection* true] | ||
(are [ns-sym] (= "" | ||
(with-out-str | ||
(binding [*err* *out*] | ||
(require :reload ns-sym)))) | ||
;; Order of the below is IMPORTANT. set depends on map, and if you | ||
;; reload map *after* reloading set, then set refers to classes that | ||
;; don't exist anymore, and all kinds of bad stuff happens | ||
;; (in this test and others) | ||
'ordered.map 'ordered.set))) |
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,6 @@ | ||
#kaocha/v1 | ||
{:tests [{:id :clj} | ||
{:id :cljs | ||
:type :kaocha.type/cljs}] | ||
:plugins [:notifier :print-invocations :hooks] | ||
:kaocha.hooks/pre-load [(fn [t] (require (quote flatland.ordered.map)) t)]} |