Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
parenscript
parenscript
Commits
b975f7d7
Verified
Commit
b975f7d7
authored
Oct 20, 2018
by
Vladimir Sedach
Browse files
Added more unit tests
parent
b35ef4f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/eval-tests.lisp
View file @
b975f7d7
...
...
@@ -832,3 +832,39 @@
(
setf
(
aref
x
i
)
(
lambda
()
i
))))
(
loop
for
x
across
x
sum
(
funcall
x
)))
45
)
(
test-js-eval
nested-let
(
let
((
x
(
let
((
y
94
))
y
)))
x
)
94
)
(
test-js-eval
lambda-apply
((
lambda
(
x
)
(
apply
(
lambda
(
y
)
(
1+
y
))
x
))
(
list
6
))
7
)
(
test-js-eval
subtract-associative
(
list
(
-
1
2
3
)
(
-
1
(
-
2
3
)))
'
(
-4
2
))
(
test-js-eval
logand1
(
let
((
x
4583
))
(
setf
x
(
logand
x
947
))
x
)
419
)
(
test-js-eval
cons-cdr-clause-empty
((
lambda
()
(
cond
(
923
))))
923
)
(
test-js-eval
labels-return-from
(
labels
((
bar
(
x
)
(
when
(
evenp
x
)
(
return-from
bar
"even"
))
"odd"
))
(
bar
9
))
"odd"
)
tests/output-tests.lisp
View file @
b975f7d7
...
...
@@ -4112,6 +4112,15 @@ function foo(x) {
return 'abc';
};"
)
(
test-ps-js
return-object
(
defun
foo
(
obj
)
(
ps:create
:abc
(
let
((
x
(
ps:getprop
obj
"blah"
)))
(
if
x
123
456
))))
"function foo(obj) {
var x;
return { 'abc' : (x = obj['blah'], x ? 123 : 456) };
};"
)
;;; broken
;; (test-ps-js let-defun-toplevel
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment