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

Enum tests failing #51

Open
BurnySc2 opened this issue Aug 22, 2023 · 1 comment
Open

Enum tests failing #51

BurnySc2 opened this issue Aug 22, 2023 · 1 comment

Comments

@BurnySc2
Copy link

Unsure if this is a duplicate of #39 , but the tests run via
testament pattern "tests/*.nim"
are failing. Specifically only the enum test.

As I'm new to nim, I'm not smart enough to submit a pull request to fix it.

Do you have a suggestion on a workaround?
I can use ints instead of enums, but that doesn't seem like an ideal solution either.
E.g.

x {.fieldNumber: 1, fixed.}: int32

instead of

x {.fieldNumber: 1.}: MyEnum
@arnetheduck
Copy link
Member

I can use ints instead of enums, but that doesn't seem like an ideal solution either.

this would be the way to go since enum in in semantically differs significantly form its protobuf counterpart. In particular, you need to be careful around values that are not part of the enum that may appear in the stream - this is valid in protobuf but not in nim.

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

No branches or pull requests

2 participants