Skip to content

Conversation

@Vexu
Copy link
Member

@Vexu Vexu commented May 4, 2021

Closes #8629

There sure are a lot of tests

@andrewrk
Copy link
Member

andrewrk commented May 4, 2021

There sure are a lot of tests

😂

Copy link
Member

@andrewrk andrewrk 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 doing this!

@andrewrk
Copy link
Member

andrewrk commented May 4, 2021

Oops, just noticed this is a draft. Apologies for the premature review.

@Vexu Vexu marked this pull request as ready for review May 5, 2021 18:41
@Vexu Vexu force-pushed the try branch 4 times, most recently from eff9cda to 9c34e07 Compare May 6, 2021 18:03
@andrewrk
Copy link
Member

andrewrk commented May 8, 2021

yeah!!

@andrewrk andrewrk merged commit 67154d2 into ziglang:master May 8, 2021
@Vexu Vexu deleted the try branch May 9, 2021 04:04
jdknezek added a commit to jdknezek/uuid6-zig that referenced this pull request May 11, 2021
iguessthislldo added a commit to iguessthislldo/georgios that referenced this pull request May 12, 2021
semarie added a commit to semarie/zig that referenced this pull request May 12, 2021
allow testType() to fail too.
@BarabasGitHub
Copy link
Contributor

What's the recommended way of updating existing code for this? I have so many tests... D=

@Vexu
Copy link
Member Author

Vexu commented May 16, 2021

What's the recommended way of updating existing code for this?

Basically just doing what I did in this pr, slap a bunch of trys in front of calls to std.testing.expect* and everything should just work.

@BarabasGitHub
Copy link
Contributor

Yeah kind of... definitely not that easy if you wrote any kind of expectEqual functions yourself. Especially not when they're recursive (like with a tree).
I'll have to update this for some other time.

@ikskuh
Copy link
Contributor

ikskuh commented May 16, 2021

find -name "*.zig" -exec sed -i 's/std.testing.expect/try std.testing.expect/g' '{}'

Should update most things correctly 😁
Self-made recursive test functions shouldn't be a problem either, you just have to slap the explicit error set (which is well-known) onto you functions instead of inferring the error set

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.

allow tests to fail

4 participants