Or conjunction
See original GitHub issueWould it be possible to add an or conjunction for the case that there are multiple ways to pass a test?
Example:
val value: String = nextMagicValue()
expectThat(value).or {
isEqualTo("3.14")
isEqualTo("42")
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5 (3 by maintainers)
Top Results From Across the Web
OR (conjunction) definition and synonyms | Macmillan Dictionary
Definition of OR (conjunction): used for showing possibilities or choices; and not; when you do not know exact number; used in warnings, threats,...
Read more >or conjunction - Oxford Learner's Dictionaries
or · . used to introduce another possibility · . used in negative sentences when mentioning two or more things · . (also...
Read more >The conjunctions and, or and but - EnglishGrammar.org
The most important among the coordinating conjunctions are and, but and or. Let's explore the uses of these three little words. And.
Read more >Coordinating conjunctions: so, and, but, or, yet, for, nor
Conjunctions are words which connect sentences or groups of words. Some learners know them as connectors or joining words. One type of conjunction...
Read more >Or Definition & Meaning | Britannica Dictionary
OR meaning: 1 : used to introduce another choice or possibility; 2 : used in negative statements to introduce something else that is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Personally, I think the proposed syntax is a bit odd. If it opens a lambda, maybe it should be
anyOf
oroneOf
or something along those lines? Or maybeor
could be an infix operator?It should be possible, I think. It’s fundamentally similar to the
any
conjunction that already exists forAssertion.Builder<Iterable<*>>
.