Skip to content

Commit c865113

Browse files
committed
add ICloneable to light types, more tests
1 parent 82d2bac commit c865113

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12261,6 +12261,9 @@ reduces them without incurring seq initialization"
1226112261
IWithMeta
1226212262
(-with-meta [coll meta] (Vector. meta array __hash))
1226312263

12264+
ICloneable
12265+
(-clone [coll] (Vector. meta array __hash))
12266+
1226412267
IMeta
1226512268
(-meta [coll] meta)
1226612269

@@ -12462,6 +12465,9 @@ reduces them without incurring seq initialization"
1246212465
IMeta
1246312466
(-meta [coll] meta)
1246412467

12468+
ICloneable
12469+
(-clone [coll] (ObjMap. meta keys strobj __hash))
12470+
1246512471
ICollection
1246612472
(-conj [coll entry]
1246712473
(if (vector? entry)
@@ -12632,6 +12638,9 @@ reduces them without incurring seq initialization"
1263212638
IMeta
1263312639
(-meta [coll] meta)
1263412640

12641+
ICloneable
12642+
(-clone [coll] (HashMap. meta count hashobj __hash))
12643+
1263512644
ICollection
1263612645
(-conj [coll entry]
1263712646
(if (vector? entry)
@@ -12786,6 +12795,9 @@ reduces them without incurring seq initialization"
1278612795
IMeta
1278712796
(-meta [coll] meta)
1278812797

12798+
ICloneable
12799+
(-clone [coll] (Set. meta hash-map __hash))
12800+
1278912801
ICollection
1279012802
(-conj [coll o]
1279112803
(Set. meta (assoc hash-map o nil) nil))

src/test/cljs/lite_test_runner.cljs

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@
88

99
(ns lite-test-runner
1010
(:require [cljs.test :refer-macros [run-tests]]
11+
[cljs.apply-test]
12+
[cljs.primitives-test]
13+
[cljs.destructuring-test]
14+
[cljs.new-new-test]
15+
[cljs.seqs-test]
16+
[cljs.hashing-test]
17+
[cljs.interop-test]
18+
[cljs.iterator-test]
19+
[cljs.binding-test]
20+
[cljs.ns-test]
21+
[clojure.set-test]
22+
[clojure.string-test]
23+
[clojure.data-test]
24+
[clojure.datafy-test]
25+
[clojure.edn-test]
26+
[clojure.walk-test]
27+
[clojure.math-test]
28+
[cljs.macro-test]
29+
[cljs.letfn-test]
1130
[cljs.core-test]
1231
[cljs.lite-collections-test]))
1332

@@ -19,6 +38,24 @@
1938
(enable-console-print!))
2039

2140
(run-tests
22-
'cljs.lite-collections-test
41+
'cljs.apply-test
42+
'cljs.primitives-test
43+
'cljs.destructuring-test
44+
'cljs.new-new-test
45+
#_'cljs.seqs-test ;; rseq Vector
46+
#_'cljs.hashing-test
47+
#_'cljs.interop-test ;; ES6 stuff
48+
#_'cljs.iterator-test
49+
'cljs.binding-test
50+
'cljs.ns-test
51+
'clojure.set-test
52+
'clojure.string-test
53+
#_'clojure.data-test ;; 1 failure #object[Error Error: No item 1 in vector of length 1]
54+
'clojure.datafy-test
55+
'clojure.edn-test
56+
'clojure.walk-test
57+
'clojure.math-test
58+
'cljs.macro-test
2359
'cljs.core-test
60+
'cljs.lite-collections-test
2461
)

0 commit comments

Comments
 (0)