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

Adding tests that show errors in deserialization #125

Merged
merged 6 commits into from
Apr 28, 2022

Conversation

orchestr7
Copy link
Owner

@orchestr7 orchestr7 commented Mar 15, 2022

What's done:

  • test for invalid custom serialization
  • support of custom serialization for small classes (primitive scenario)
  • extra complex tests for custom serializers (ignored)

### What's done:
- test for invalid custom serialization
- test for invalid inline serialization
@orchestr7 orchestr7 added the bug Something isn't working label Mar 15, 2022
…x/invalid-traversal

� Conflicts:
�	ktoml-core/src/commonTest/kotlin/com/akuleshov7/ktoml/decoders/InlineDecoderTest.kt
@orchestr7 orchestr7 force-pushed the bugfix/invalid-traversal branch from 85bb617 to 0d1b848 Compare April 28, 2022 19:34
data class Settings(val background: SingleProperty, val foreground: SingleProperty)

@Test
@Ignore
Copy link
Owner Author

Choose a reason for hiding this comment

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

This test does not work, but I actually would have expected it be working

class Color(val rgb: Int)

@Test
@Ignore
Copy link
Owner Author

@orchestr7 orchestr7 Apr 28, 2022

Choose a reason for hiding this comment

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

@orchestr7
Copy link
Owner Author

@bishiboosh @NightEule5 this is a very small PR with a workaround for custom serializers (with the override of deserialise() method), that some users can add.

I hope you don't mind if I merge it without the review as it is very primitive - just a small hack.

I also have found that some more complex cases are not working, so I have added tests and ignored them

@orchestr7 orchestr7 merged commit cad887f into main Apr 28, 2022
@orchestr7 orchestr7 deleted the bugfix/invalid-traversal branch April 28, 2022 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant