Comments (5)
I think I'm leaning towards []
as proposed right now. I don't think that any of these is better, but
=> ignore = "reason" "result"
may be a bit confusing.
from test-case.
Hmm, yeah, it's definitelly something missing. I remember ignore comment syntax was present since 1.3x or earlier, so it shouldn't be a breaking change, we have MSRV 1.49 anyway. It just wasn't thought of.
I like your second proposal, if you have resources and time PR is welcome.
from test-case.
I assumed we want the reason to be optional, for backward compat so that existing cases do not all need updating and can still use a bare inconclusive
. Given that then using ()
to surround the reason argument was ambiguous -- since => inconclusive ()
should mean a test with output ()
but is treated as one with an empty reason and no output specified. Similar problems exist with => inconclusive ("this is the result")
where this is the result
ended up as the reason not the expected result...
I went with []
instead and will open a PR in a moment, {}
would be an easy change if preferred. Other things (like <>
) would need more custom handling.
from test-case.
What about => inconclusive = "this is reason" ("this is result")
? @luke-biel would that be ambiguous or/and better?
from test-case.
I think that would be unambiguous? At least I don't think there are any output matchers which start with an =
(nor an ==
FWIW` although I don't think that would be ambiguous even if there was).
I guess it's a question of taste/style and perhaps future direction, happy to defer to you both.
from test-case.
Related Issues (20)
- Does not fully work with `pretty_assertions`, fix OK? HOT 2
- feature request: test_case generators HOT 1
- Getting current test case description from within the test function HOT 4
- Expose `TestCase` struct publicly for reuse HOT 1
- please include LICENSE file in all published crates HOT 2
- Set test case function `Ident` spans to corresponding `test_case` spans HOT 2
- Is return value in test required? HOT 8
- On nightlies and betas, `cargo +nightly clippy` creates `items_after_test_module` warnings HOT 9
- Type as test case argument HOT 9
- When generating assert the right side should be the "correct" side. HOT 19
- New clippy lint in Rust 1.71.0, `items_after_test_module`, affecting integration tests HOT 3
- upgrade dependency proc-macro2 HOT 1
- error[E0432]: unresolved import `test_case_macros::test_matrix` using 3.2.0 HOT 3
- Test case macro should not rely on implementation details of the built-in test framework HOT 3
- `syn::Result::ok` silently discards errors
- macro for bench cases HOT 1
- Conditional flags for ignore and inconclusive HOT 3
- Iterable args: a way to expand a given argument of `test_matrix`
- Example usage of test_matrix broken HOT 1
- Ignoring test cases
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test-case.