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

Is true or false #21

Merged
merged 4 commits into from Feb 4, 2019
Merged

Conversation

ufobat
Copy link
Member

@ufobat ufobat commented Jan 29, 2019

Added Features to test in boolean context.
This addresses #8 and #18

README.md Outdated Show resolved Hide resolved
@AlexDaniel
Copy link

So you added is-true, is-false, is-so, is-not. What's the justification for introducing these? Looks like bloat to me.

@AlexDaniel
Copy link

Ah… I see, there's no other easy/obvious way to check for Truthy/Falsey values?

@ufobat
Copy link
Member Author

ufobat commented Jan 30, 2019

There is. You could do a is $expression, *.so;.

I would discourage ppl from doing so, because as described in #20 I am not aware of a way generate a propper test case description with WhateverCode because

  1. $whatevercode.perl is represended as { ... } and
  2. $whatevercode($got) applys the whatevercode and returns it, but doesnt tell what whatever is looking for.

@ufobat
Copy link
Member Author

ufobat commented Jan 30, 2019

If we considder #18 as a duplicate of #8 I would suggest to use is-so and is-not because is-true sounds as if we would do a $got === True. so and not are used to enforce a boolean context.

@AlexDaniel
Copy link

And there's also #6 which suggests to rename is-run to runs… Following that logic, maybe ok is not too bad. Don't know if this bikeshedding is worth it, but I do think that more obvious routine names is a good thing in a long run.

@AlexDaniel
Copy link

AlexDaniel commented Feb 4, 2019

I think ok and nok make sense for now. It's possible that we'll come up with better names, but if we want to create a mostly drop-in replacement for Test, I think it's not wrong to have ok and nok.

Feel free to merge this yourself.

@ufobat ufobat merged commit d1134ec into raku-community-modules:master Feb 4, 2019
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.

None yet

2 participants