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
12afafde
Verified
Commit
12afafde
authored
Oct 12, 2018
by
Vladimir Sedach
Browse files
Added a couple of unit tests
parent
12723b29
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/compilation-interface.lisp
View file @
12afafde
;;; Copyright 2005 Manuel Odendahl
;;; Copyright 2005-2006 Edward Marco Baringer
;;; Copyright 2006 Luca Capello
;;; Copyright 2007 Red Daly
;;; Copyright 2007
-2009
Red Daly
;;; Copyright 2008 Travis Cross
;;; Copyright 2007-2011 Vladimir Sedach
;;; Copyright 2009-2010 Daniel Gackle
...
...
tests/output-tests.lisp
View file @
12afafde
...
...
@@ -1884,6 +1884,11 @@ return foo(1);
};
};"
)
(
test-ps-js
nested-if-expressions3
(
foo
(
if
(
if
x
y
z
)
a
b
)
(
if
x
y
(
if
z
a
b
)))
"foo((x ? y : z) ? a : b, x ? y : (z ? a : b));"
)
(
test-ps-js
let1
(
let
(
x
)
(
+
x
x
))
...
...
tests/package-system-tests.lisp
View file @
12afafde
...
...
@@ -53,6 +53,24 @@
return x + y;
};"
)
(
test-ps-js
lib-function2
(
defun
parenscript.tests.my-library::library-function
(
parenscript.tests.my-library::x
&key
((
:y
parenscript.tests.my-library::z
)
1
))
(
+
parenscript.tests.my-library::x
parenscript.tests.my-library::z
))
"function my_library_libraryFunction(my_library_x) {
var _js2 = arguments.length;
for (var n1 = 1; n1 < _js2; n1 += 2) {
switch (arguments[n1]) {
case 'y':
my_library_z = arguments[n1 + 1];
};
};
var my_library_z = 'undefined' === typeof my_library_z ? 1 : my_library_z;
return my_library_x + my_library_z;
};"
)
(
test-ps-js
uniform-symbol-handling1
(
progn
(
create
parenscript.tests.my-library::foo
1
)
(
getprop
foo
'parenscript.tests.my-library::foo
))
...
...
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