simple tests for the floating point number writing.
This commit is contained in:
parent
0aaf587341
commit
cfdcd215be
4
NOTES
4
NOTES
|
@ -731,7 +731,9 @@ Working out the type mappings between values in Racket and values in JavaScript
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
get-viewport-width
|
I should add the functions:
|
||||||
|
|
||||||
|
get-viewport-width
|
||||||
get-viewport-height
|
get-viewport-height
|
||||||
|
|
||||||
|
Other notes from Shriram: too slow, inconsistent positioning from jsworld.
|
|
@ -687,7 +687,7 @@ if (! this['plt']) { this['plt'] = {}; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jsnums.isSchemeNumber(x)) {
|
if (jsnums.isSchemeNumber(x)) {
|
||||||
return numberToDomNode(x);
|
return numberToDomNode(x, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof(x) == 'object') {
|
if (typeof(x) == 'object') {
|
||||||
|
@ -750,7 +750,7 @@ if (! this['plt']) { this['plt'] = {}; }
|
||||||
|
|
||||||
// numberToDomNode: jsnum -> dom
|
// numberToDomNode: jsnum -> dom
|
||||||
// Given a jsnum, produces a dom-node representation.
|
// Given a jsnum, produces a dom-node representation.
|
||||||
var numberToDomNode = function(n) {
|
var numberToDomNode = function(n, params) {
|
||||||
var node;
|
var node;
|
||||||
if (jsnums.isExact(n)) {
|
if (jsnums.isExact(n)) {
|
||||||
if (jsnums.isInteger(n)) {
|
if (jsnums.isInteger(n)) {
|
||||||
|
|
|
@ -479,6 +479,31 @@ EOF
|
||||||
"false\n")
|
"false\n")
|
||||||
|
|
||||||
|
|
||||||
|
;;(test '(displayln 2/3)
|
||||||
|
;; "2/3\n")
|
||||||
|
|
||||||
|
|
||||||
|
;;(test '(displayln -2/3)
|
||||||
|
;; "-2/3\n")
|
||||||
|
|
||||||
|
|
||||||
|
(test '(displayln -0.0)
|
||||||
|
"-0.0\n")
|
||||||
|
|
||||||
|
(test '(displayln +nan.0)
|
||||||
|
"+nan.0\n")
|
||||||
|
|
||||||
|
(test '(displayln +inf.0)
|
||||||
|
"+inf.0\n")
|
||||||
|
|
||||||
|
(test '(displayln -inf.0)
|
||||||
|
"-inf.0\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; Knuth's Man-or-boy-test.
|
;; Knuth's Man-or-boy-test.
|
||||||
|
|
|
@ -1368,7 +1368,6 @@
|
||||||
20116)
|
20116)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(test '(let () (define (f x y z)
|
(test '(let () (define (f x y z)
|
||||||
(values y x z))
|
(values y x z))
|
||||||
(call-with-values (lambda () (f 3 1 4))
|
(call-with-values (lambda () (f 3 1 4))
|
||||||
|
@ -1376,6 +1375,7 @@
|
||||||
'((1 3 4))
|
'((1 3 4))
|
||||||
#:with-bootstrapping? #t)
|
#:with-bootstrapping? #t)
|
||||||
|
|
||||||
|
|
||||||
(test '(let () (define (f x y z)
|
(test '(let () (define (f x y z)
|
||||||
(begin0 (values y x z)
|
(begin0 (values y x z)
|
||||||
(display "")))
|
(display "")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user