Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failed tests after compiler PR #269 #104

Merged
merged 1 commit into from
Mar 9, 2024

Conversation

Mingun
Copy link
Contributor

@Mingun Mingun commented Mar 9, 2024

PR kaitai-io/kaitai_struct_compiler#269 changes the error text, but tests was note updated. This PR fixes the tests.

Fixes

[info] - expr_bytes_to_s_arg0 *** FAILED ***
[info]   expr_bytes_to_s_arg0.ksy: /instances/bad/value:
[info]   	error: wrong arguments to method call `to_s` on byte array: expected (string), got ()
[info]    did not equal expr_bytes_to_s_arg0.ksy: /instances/bad/value:
[info]   	error: to_s: expected 1 argument, got 0 (SimpleMatchers.scala:34)
[info] - expr_bytes_to_s_arg2 *** FAILED ***
[info]   expr_bytes_to_s_arg2.ksy: /instances/bad/value:
[info]   	error: wrong arguments to method call `to_s` on byte array: expected (string), got (Str(foo), Str(bar))
[info]    did not equal expr_bytes_to_s_arg2.ksy: /instances/bad/value:
[info]   	error: to_s: expected 1 argument, got 2 (SimpleMatchers.scala:34)
[info] - expr_bytes_to_s_type *** FAILED ***
[info]   expr_bytes_to_s_type.ksy: /instances/bad/value:
[info]   	error: wrong arguments to method call `to_s` on byte array: expected (string), got (IntNum(123))
[info]    did not equal expr_bytes_to_s_type.ksy: /instances/bad/value:
[info]   	error: to_s: argument #0: expected string literal, got IntNum(123) (SimpleMatchers.scala:34)

…069a708bd10cc5b4cc4e3ddf89f58289)

Fixes

[info] - expr_bytes_to_s_arg0 *** FAILED ***
[info]   expr_bytes_to_s_arg0.ksy: /instances/bad/value:
[info]   	error: wrong arguments to method call `to_s` on byte array: expected (string), got ()
[info]    did not equal expr_bytes_to_s_arg0.ksy: /instances/bad/value:
[info]   	error: to_s: expected 1 argument, got 0 (SimpleMatchers.scala:34)
[info] - expr_bytes_to_s_arg2 *** FAILED ***
[info]   expr_bytes_to_s_arg2.ksy: /instances/bad/value:
[info]   	error: wrong arguments to method call `to_s` on byte array: expected (string), got (Str(foo), Str(bar))
[info]    did not equal expr_bytes_to_s_arg2.ksy: /instances/bad/value:
[info]   	error: to_s: expected 1 argument, got 2 (SimpleMatchers.scala:34)
[info] - expr_bytes_to_s_type *** FAILED ***
[info]   expr_bytes_to_s_type.ksy: /instances/bad/value:
[info]   	error: wrong arguments to method call `to_s` on byte array: expected (string), got (IntNum(123))
[info]    did not equal expr_bytes_to_s_type.ksy: /instances/bad/value:
[info]   	error: to_s: argument #0: expected string literal, got IntNum(123) (SimpleMatchers.scala:34)
@Mingun Mingun changed the title Fix failed tests after https://github.com/kaitai-io/kaitai_struct_compiler/pull/269 Fix failed tests after compiler PR #269 Mar 9, 2024
Copy link
Member

@GreyCat GreyCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this!

@GreyCat GreyCat merged commit 5fa7367 into kaitai-io:master Mar 9, 2024
@Mingun Mingun deleted the fix-269-tests branch March 9, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants