Commit 972ddc4
KS expression language: adjust tests after optimizations in parenthesis generation
Fixes this new errors (parenthesis around expression is not generated anymore):
```
[info] - csharp:[0 + 1, 5].as<bytes> *** FAILED ***
[info] "new byte[] { [0 + 1], 5 }" was not equal to "new byte[] { [(0 + 1)], 5 }" (TranslatorSpec.scala:856)
[info] Analysis:
[info] "new byte[] { [0 + 1], 5 }" -> "new byte[] { [(0 + 1)], 5 }"
[info] - go:[0 + 1, 5].as<bytes> *** FAILED ***
[info] "[]uint8{[0 + 1], 5}" was not equal to "[]uint8{[(0 + 1)], 5}" (TranslatorSpec.scala:856)
[info] Analysis:
[info] "[]uint8{[0 + 1], 5}" -> "[]uint8{[(0 + 1)], 5}"
[info] - java:[0 + 1, 5].as<bytes> *** FAILED ***
[info] "new byte[] { [0 + 1], 5 }" was not equal to "new byte[] { [(0 + 1)], 5 }" (TranslatorSpec.scala:856)
[info] Analysis:
[info] "new byte[] { [0 + 1], 5 }" -> "new byte[] { [(0 + 1)], 5 }"
[info] - javascript:[0 + 1, 5].as<bytes> *** FAILED ***
[info] "new Uint8Array([[0 + 1], 5])" was not equal to "new Uint8Array([[(0 + 1)], 5])" (TranslatorSpec.scala:856)
[info] Analysis:
[info] "new Uint8Array([[0 + 1], 5])" -> "new Uint8Array([[(0 + 1)], 5])"
[info] - perl:[0 + 1, 5].as<bytes> *** FAILED ***
[info] "pack('C*', ([0 + 1], 5))" was not equal to "pack('C*', ([(0 + 1)], 5))" (TranslatorSpec.scala:856)
[info] Analysis:
[info] "pack('C*', ([0 + 1], 5))" -> "pack('C*', ([(0 + 1)], 5))"
[info] - php:[0 + 1, 5].as<bytes> *** FAILED ***
[info] "pack('C*', [0 + 1], 5)" was not equal to "pack('C*', [(0 + 1)], 5)" (TranslatorSpec.scala:856)
[info] Analysis:
[info] "pack('C*', [0 + 1], 5)" -> "pack('C*', [(0 + 1)], 5)"
[info] - python:[0 + 1, 5].as<bytes> *** FAILED ***
[info] "struct.pack('2B', [0 + 1], 5)" was not equal to "struct.pack('2B', [(0 + 1)], 5)" (TranslatorSpec.scala:856)
[info] Analysis:
[info] "struct.pack('2B', [0 + 1], 5)" -> "struct.pack('2B', [(0 + 1)], 5)"
[info] - ruby:[0 + 1, 5].as<bytes> *** FAILED ***
[info] "[[0 + 1], 5].pack('C*')" was not equal to "[[(0 + 1)], 5].pack('C*')" (TranslatorSpec.scala:856)
[info] Analysis:
[info] "[[0 + 1], 5].pack('C*')" -> "[[(0 + 1)], 5].pack('C*')"
```1 parent c0f1e95 commit 972ddc4
File tree
1 file changed
+8
-8
lines changed- jvm/src/test/scala/io/kaitai/struct/translators
1 file changed
+8
-8
lines changedLines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
862 | 862 | | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
| |||
0 commit comments