Skip to content

Commit 765acba

Browse files
committed
* self-parity fails if add test to core so move test to own ns
1 parent 15bc1af commit 765acba

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

src/test/cljs/cljs/core_test.cljs

-12
Original file line numberDiff line numberDiff line change
@@ -2042,15 +2042,3 @@
20422042
(is (= 11 @c))
20432043
(is (= [11 0] (reset-vals! c 0)))
20442044
(is (= 0 @c)))))
2045-
2046-
(defn cljs-3411-function
2047-
"this function adds two numbers"
2048-
{:test #(do
2049-
(assert (= (cljs-3411-function 2 3) 5))
2050-
(assert (= (cljs-3411-function 4 4) 8)))}
2051-
([x y] (+ x y)))
2052-
2053-
(deftest cljs-3411
2054-
(testing "cljs.core/test respects docstring"
2055-
(is (= :ok (test cljs-3411)))
2056-
(is (= :ok (test #'cljs-3411)))))

src/test/cljs/cljs/var_test.cljs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
;; Copyright (c) Rich Hickey. All rights reserved.
2+
;; The use and distribution terms for this software are covered by the
3+
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4+
;; which can be found in the file epl-v10.html at the root of this distribution.
5+
;; By using this software in any fashion, you are agreeing to be bound by
6+
;; the terms of this license.
7+
;; You must not remove this notice, or any other, from this software.
8+
9+
(ns cljs.var-test
10+
(:require [cljs.test :refer-macros [deftest is]]))
11+
12+
(defn cljs-3411-function
13+
"this function adds two numbers"
14+
{:test #(do
15+
(assert (= (cljs-3411-function 2 3) 5))
16+
(assert (= (cljs-3411-function 4 4) 8)))}
17+
([x y] (+ x y)))
18+
19+
(deftest cljs-3411
20+
(testing "cljs.core/test respects docstring"
21+
(is (= :ok (test cljs-3411)))
22+
(is (= :ok (test #'cljs-3411)))))

src/test/cljs/test_runner.cljs

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
[cljs.inference-test]
5858
[cljs.walk-test]
5959
[cljs.repl-test]
60-
[cljs.extend-to-native-test]))
60+
[cljs.extend-to-native-test]
61+
[cljs.var-test]))
6162

6263
(set! *print-newline* false)
6364

@@ -116,4 +117,5 @@
116117
'cljs.inference-test
117118
'cljs.walk-test
118119
'cljs.repl-test
119-
'cljs.extend-to-native-test)
120+
'cljs.extend-to-native-test
121+
'cljs.var-test)

0 commit comments

Comments
 (0)