Fix PYSON.Equal with Array
In javascript, Array comparison doesn't work with '=='. It should use the Sao.common.compare. issue5474 review18001002
This commit is contained in:
1 parent
0afceea9a7
commit
f3aa2a82ea
2 files changed
+16
-2
No files matched your search
+11
-1
@@ -312,7 +312,17 @@
|
||||
eval_ = new Sao.PYSON.Encoder().encode(
|
||||
new Sao.PYSON.Equal('foo', 'bar'));
|
||||
QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), false,
|
||||
"decode(Equal('test', 'test'))");
|
||||
"decode(Equal('foo', 'bar'))");
|
||||
|
||||
eval_ = new Sao.PYSON.Encoder().encode(
|
||||
new Sao.PYSON.Equal(['test'], ['test']));
|
||||
QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), true,
|
||||
"decode(Equal(['test'], ['test']))");
|
||||
|
||||
eval_ = new Sao.PYSON.Encoder().encode(
|
||||
new Sao.PYSON.Equal(['foo'], ['bar']));
|
||||
QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), false,
|
||||
"decode(Equal(['foo'], ['bar']))");
|
||||
});
|
||||
|
||||
QUnit.test('PYSON Greater', function() {
|
||||
|
||||
Reference in new issue
Block a user