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
35843baf
Verified
Commit
35843baf
authored
Oct 07, 2018
by
Vladimir Sedach
Browse files
Tests to clarify behavior of SYMBOL-MACROLET wrt CREATE and GETPROP
parent
99fc3eb3
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/output-tests.lisp
View file @
35843baf
...
@@ -1173,6 +1173,10 @@ __setf_someThing('foo', 1, 2);")
...
@@ -1173,6 +1173,10 @@ __setf_someThing('foo', 1, 2);")
(
getprop
(
progn
(
some-fun
"abc"
)
"123"
)
"length"
)
(
getprop
(
progn
(
some-fun
"abc"
)
"123"
)
"length"
)
"(someFun('abc'), '123')['length'];"
)
"(someFun('abc'), '123')['length'];"
)
(
test-ps-js
getprop-multi1
(
getprop
foo
1
"two"
three
'bar
1
2
)
"foo[1]['two'][three].bar[1][2];"
)
(
test-ps-js
method-call-block
(
test-ps-js
method-call-block
((
@
(
progn
(
some-fun
"abc"
)
"123"
)
to-string
))
((
@
(
progn
(
some-fun
"abc"
)
"123"
)
to-string
))
"(someFun('abc'), '123').toString();"
)
"(someFun('abc'), '123').toString();"
)
...
@@ -2015,10 +2019,35 @@ return x + x;
...
@@ -2015,10 +2019,35 @@ return x + x;
"[1];"
)
"[1];"
)
(
test-ps-js
symbol-macro-obj
(
test-ps-js
symbol-macro-obj
(
symbol-macrolet
((
x
y
))
(
symbol-macrolet
((
x
(
+
1
2
)
))
(
create
x
1
))
(
create
x
1
))
"({ x : 1 });"
)
"({ x : 1 });"
)
(
test-ps-js
symbol-macro-obj1
(
symbol-macrolet
((
x
(
+
1
2
)))
(
ps:create
x
x
))
"({ x : 1 + 2 });"
)
(
test-ps-js
symbol-macro-getprop1
(
symbol-macrolet
((
x
(
+
1
2
)))
(
ps:getprop
a
x
))
"a[1 + 2];"
)
(
test-ps-js
symbol-macro-getprop1
(
symbol-macrolet
((
x
(
+
1
2
)))
(
ps:getprop
a
'x
))
"a.x;"
)
(
test-ps-js
let-let-create
(
let
((
a
99
))
(
let
((
a
22
))
(
create
a
33
)))
"(function () {
var a = 99;
var a1 = 22;
return { a : 33 };
})();"
)
(
test-ps-js
symbol-macro-conditional1
(
test-ps-js
symbol-macro-conditional1
(
symbol-macrolet
((
x
y
))
(
symbol-macrolet
((
x
y
))
(
if
x
x
x
))
(
if
x
x
x
))
...
...
tests/package-system-tests.lisp
View file @
35843baf
...
@@ -81,6 +81,11 @@ return !foo1 && foo1.prefix_bar + prefix_someOtherVar;
...
@@ -81,6 +81,11 @@ return !foo1 && foo1.prefix_bar + prefix_someOtherVar;
return prefix_baz + gpp;
return prefix_baz + gpp;
};"
)
};"
)
(
parenscript.tests::test-ps-js
prefixed-symbol-macro-obj1
(
symbol-macrolet
((
x
(
+
1
2
)))
(
ps:create
x
x
))
"({ prefix_x : 1 + 2 });"
)
(
cl:in-package
#:parenscript.tests
)
(
cl:in-package
#:parenscript.tests
)
(
test
compile-stream-in-package
(
test
compile-stream-in-package
...
...
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