Allow PYSON Expression as key for PYSON In with dict object

issue10542
This commit is contained in:
Maxime Richez committed 2021-07-11 11:25:30 +02:00
1 parent 987fefcb4b
commit 3e758d18aa
1 file changed
+10
+10
View File
@@ -735,6 +735,11 @@
QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), true,
"decode(In('foo', {foo: 'bar'}))");
eval_ = new Sao.PYSON.Encoder().encode(
new Sao.PYSON.In(new Sao.PYSON.Eval('test', 'foo'), {foo: 'bar'}));
QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), true,
"decode(In(Eval('test', 'foo'), {foo: 'bar'}))");
eval_ = new Sao.PYSON.Encoder().encode(
new Sao.PYSON.In('1', {1: 'bar'}));
QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), true,
@@ -745,6 +750,11 @@
QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), false,
"decode(In('test', {foo: 'bar'}))");
eval_ = new Sao.PYSON.Encoder().encode(
new Sao.PYSON.In(new Sao.PYSON.Eval('foo', 'test'), {foo: 'bar'}));
QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), false,
"decode(In(Eval('foo', 'test'), {foo: 'bar'}))");
eval_ = new Sao.PYSON.Encoder().encode(
new Sao.PYSON.In('foo', ['foo']));
QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), true,