-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the ? operator in parameterized tests, similar to Rus…
…t 2018's support for Result-returning tests. This also adds a dependency on anyhow, to simplify result propagation and avoid requiring users to specify a particular Result-type. Due to rust-lang/rust#69517 we manually unwrap() the user-provided Result for the time being. When that issue is resolved the implementation can be simplified slightly.
- Loading branch information
Showing
4 changed files
with
89 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
name: Rust | ||
|
||
on: [push] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
CI: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-targets --all-features | ||
- name: Check | ||
run: cargo check --all-targets --verbose | ||
- name: Check (no-default-features) | ||
run: cargo check --all-targets --verbose --no-default-features | ||
- name: Check Documentation | ||
env: | ||
RUSTDOCFLAGS: -D warnings | ||
run: cargo doc --no-deps --document-private-items | ||
- name: Tests | ||
run: cargo test --verbose | ||
- name: Tests (no-default-features) | ||
run: cargo test --verbose --no-default-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,18 @@ keywords = ["testing", "parameterized", "macro"] | |
license = "MIT OR Apache-2.0" | ||
repository = "https://github.com/dimo414/parameterized_test" | ||
authors = ["Michael Diamond <[email protected]>"] | ||
version = "0.1.0" | ||
version = "0.2.0" | ||
edition = "2018" | ||
include = [ | ||
"**/*.rs", | ||
"Cargo.toml", | ||
"README.md", | ||
] | ||
|
||
[features] | ||
default = ['propagation'] | ||
propagation = ['anyhow'] | ||
|
||
[dependencies.anyhow] | ||
optional = true | ||
version = "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters