Skip to content

Commit 7089c9d

Browse files
mfikesdnolen
authored andcommitted
CLJS-2105: Add Nashorn CI test coverage
1 parent f45a6b1 commit 7089c9d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ before_script:
1818
script:
1919
- jsc builds/out-adv/core-advanced-test.js | grep -o '[[:digit:]]*' | tail -n 2 | python script/check.py
2020
- ./spidermoney/js -f builds/out-adv/core-advanced-test.js | grep -o '[[:digit:]]*' | tail -n 2 | python script/check.py
21+
- jjs builds/out-adv/core-advanced-test.js | grep -o '[[:digit:]]*' | tail -n 2 | python script/check.py
2122
- script/test-self-host | grep -o '[[:digit:]]*' | tail -n 2 | python script/check.py
2223
- script/test-self-parity | grep -o '[[:digit:]]*' | tail -n 2 | python script/check.py

src/test/cljs/cljs/pprint_test.cljs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,16 +1070,18 @@ Usage: *hello*
10701070
| {:a is-a} | 1 |
10711071
| 5 | 7 |
10721072
"
1073-
;;This test is changed a bit due to the way JS prints large numbers. The number
1074-
;; was changed (54.7e17 to 54.7e20) to make sure JS prints it in E notation (5.47E21)
1073+
;; This test is changed a bit due to the way JS prints large numbers, as well as the
1074+
;; way Nashorn formats floating point output using Java. The number was changed
1075+
;; (54.7e17 to 54.7e21) to make sure JS prints it in E notation (5.47E22) and Nashorn
1076+
;; truncates at the desired precision.
10751077
(with-out-str
10761078
(print-table [:a :e :d :c]
1077-
[{:a 54.7e20 :b {:a 'is-a} :c ["hi" "there"]}
1079+
[{:a 54.7e21 :b {:a 'is-a} :c ["hi" "there"]}
10781080
{:b 5 :a -23 :c "dog" :d 'panda}]))
10791081
"
10801082
| :a | :e | :d | :c |
10811083
|----------+----+-------+----------------|
1082-
| 5.47e+21 | | | [\"hi\" \"there\"] |
1084+
| 5.47e+22 | | | [\"hi\" \"there\"] |
10831085
| -23 | | panda | dog |
10841086
"
10851087
)

0 commit comments

Comments
 (0)