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

Exercise 102 shall be for testing #277

Closed
chrboesch opened this issue May 3, 2023 · 4 comments · Fixed by #304
Closed

Exercise 102 shall be for testing #277

chrboesch opened this issue May 3, 2023 · 4 comments · Fixed by #304

Comments

@chrboesch
Copy link
Collaborator

Testing in Zig is important and I would like to create an exercise for it. But the challenge is to extend our build system to include a test step that we can turn on with a new flag test_run.
I will open a PR with a simple test exercise, that we can to extend the build system.

@perillo
Copy link
Contributor

perillo commented May 8, 2023

The zig test command supports the Zig IPC; the advantage is that it will allow the use of custom colors in ZiglingStep.
See https://github.com/ziglang/zig/blob/3f3b1a6/lib/std/Build/Step/Run.zig#L936

The alternative is to just run zig test; the advantage is that we don't have to add additionally code.

@chrboesch
Copy link
Collaborator Author

the advantage is that we don't have to add additionally code

Sure, but it doesn't fit into the learning path, when you have to enter a different command instead of zig build.
Therefore I would like to extend our build system.

@ratfactor
Copy link
Owner

Would a stand-alone executable (#296) help or hurt this effort?

@chrboesch
Copy link
Collaborator Author

Would a stand-alone executable (#296) help or hurt this effort?

We need to start a process where we run e.g. zig test 102_testing.zig. So it should not be as difficult as creating a test step in the current build system. Rather easier.

This was referenced May 14, 2023
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 a pull request may close this issue.

3 participants