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

YAML 1.2 Test Case Generator #19

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

YAML 1.2 Test Case Generator #19

wants to merge 19 commits into from

Conversation

Bergasms
Copy link

@Bergasms Bergasms commented Feb 1, 2023

  • Contains updates to the parser to resolve build errors (thing.field_type -> thing.type).
  • Added a generator that will automatically build tests cases from the YAML 1.2 compliance set if present.
  • Removed some null optional unwraps in the parser that were causing the parser to crash on some of the test cases.

begins the process of resolving #16

Brendan Dennis added 15 commits January 29, 2023 13:16
Fixed references to 'field_type' being renamed to 'type'

Checked all tests now pass
…ed by the 1.2 YAML test cases and autogenerates zig test cases
Updated the tests to the improved format as suggested.
Updated Readme to include information about tests

Fixed missing error return for cases that we expect success on
…===' file as a comment header. This will also be useful in future failure messages.
… generating only specific tests to run against, which should help reduce the amount of excess messages when running the test cases.
…effectively supresses the call stack report on error and just logs success/failure as a one liner. Allows for quicker review of pass/fail
@kubkon
Copy link
Owner

kubkon commented Feb 3, 2023

Looks like there are some formatting issues in src/parse.zig. Would you mind fixing those?

@Bergasms
Copy link
Author

Bergasms commented Feb 5, 2023

Looks like there are some formatting issues in src/parse.zig. Would you mind fixing those?

Ah, yes I had the formatter off. I can do.

Copy link
Author

@Bergasms Bergasms left a comment

Choose a reason for hiding this comment

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

Ta for this. Reminds me I need to enable the formatter again

@kubkon
Copy link
Owner

kubkon commented Feb 7, 2023

I see that the CI is trying to run the spec tests even though we haven't provided any: https://github.com/kubkon/zig-yaml/actions/runs/4096254949/jobs/7084964904#step:6:5

I see two possible solutions here: 1) we make the spec test part of this repo via submodule or otherwise, or 2) we add a conditional build flag such as -Denable-spec-tests which puts the burden of actually cloning the tests on the user using the flag when running the zig build test -Denable-spec-tests. Initially, I am happy to go with the latter, however, I think that eventually we will want to make spec tests a submodule dep (or otherwise) of this repo and run them on every push in the CI. Lemme know what you think!

Also, if you decide to go with the latter, here's an example of how something similar is being done for the Zig compiler itself: https://github.com/ziglang/zig/blob/a5b34a61ab61882bf55d87e4cbc8186215ecf320/build.zig#L106 If you follow all callsites of this variable, you will hopefully get a good idea how it's architected.

Copy link
Owner

@kubkon kubkon left a comment

Choose a reason for hiding this comment

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

See the top-level comments for what needs to be done next.

@Bergasms
Copy link
Author

Bergasms commented Feb 7, 2023

Cheers, I will have a look at the next opportunity :)

Brendan Dennis added 2 commits February 28, 2023 23:03
Build file seeems to be working but i don't think the .test CompileStep works anymore. bug?
Updated test module dependencies and set kind to correct enum variant
@Bergasms Bergasms requested a review from kubkon March 9, 2023 11:16
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