File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -5516,9 +5516,10 @@ reduces them without incurring seq initialization"
5516
5516
the resulting vector shares structure with the original and no
5517
5517
trimming is done."
5518
5518
([v start]
5519
- (subvec v start (count v)))
5519
+ (subvec v start (count v)))
5520
5520
([v start end]
5521
- (build-subvec nil v start end nil )))
5521
+ (assert (and (not (nil? start)) (not (nil? end))))
5522
+ (build-subvec nil v start end nil )))
5522
5523
5523
5524
(defn- tv-ensure-editable [edit node]
5524
5525
(if (identical? edit (.-edit node))
Original file line number Diff line number Diff line change 1320
1320
(is (true ? (equiv-map (MapWithNoIKVReduce. {:a 1 :b 2 :c 3 }) {:a 1 :b 2 :c 3 })))
1321
1321
(is (false ? (equiv-map (MapWithNoIKVReduce. {:a 1 :b 2 :c 3 }) {:a 1 :b 2 :c 4 })))))
1322
1322
1323
+ (deftest test-cljs-1685
1324
+ (testing " nil start or end param throws error"
1325
+ (is (= :fail (try (subvec nil nil )
1326
+ (catch js/Error e :fail ))))
1327
+ (is (= :fail (try (subvec nil 1 nil )
1328
+ (catch js/Error e :fail ))))))
1329
+
1323
1330
(comment
1324
1331
; ; ObjMap
1325
1332
; ; (let [ks (map (partial str "foo") (range 500))
You can’t perform that action at this time.
0 commit comments