Skip to content

Commit 5c04cc4

Browse files
committed
test: fix test recipe
1 parent ba49597 commit 5c04cc4

File tree

7 files changed

+19
-11
lines changed

7 files changed

+19
-11
lines changed

.cspell.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ words:
77
- nixos
88
- nixpkgs
99
- pkgs
10+
- RUSTDOCFLAGS
1011
- taplo

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"rust-analyzer.cargo.features": []
3+
}

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.6.3"
44
description = "Design-by-contract attributes"
55
authors = ["karroffel <[email protected]>"]
66
edition = "2018"
7-
repository = "https://gitlab.com/karroffel/contracts"
7+
repository = "https://gitlab.com/x52dev/contracts"
88
license = "MPL-2.0"
99
categories = ["development-tools", "development-tools::procedural-macro-helpers"]
1010
keywords = ["design-by-contract", "precondition", "postcondition", "invariant", "verification"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ This crate exposes a number of feature flags to configure the assertion behavior
150150
- `override_log` - changes all contracts (except `test_` ones) into a `log::error!()` call if the condition is violated. No abortion happens.
151151
- `mirai_assertions` - instead of regular assert! style macros, emit macros used by the [MIRAI] static analyzer. For more documentation of this usage, head to the [MIRAI] repo.
152152

153-
[MIRAI]: https://github.com/facebookexperimental/MIRAI
153+
[MIRAI]: https://github.com/endorlabs/MIRAI
154154

155155
## TODOs
156156

examples/library.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ impl Library {
2424
self.available.insert(book_id.to_string());
2525
}
2626

27+
#[allow(clippy::nonminimal_bool)]
2728
#[debug_requires(self.book_exists(book_id))]
2829
#[ensures(ret -> self.available.len() == old(self.available.len()) - 1)]
2930
#[ensures(ret -> self.lent.len() == old(self.lent.len()) + 1)]

justfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ _list:
88
# Downgrade dependencies necessary to run MSRV checks/tests.
99
[private]
1010
downgrade-for-msrv:
11-
cargo update -p=litemap --precise=0.7.4 # next ver: 1.81.0
12-
cargo update -p=zerofrom --precise=0.1.5 # next ver: 1.81.0
13-
cargo update -p=base64ct --precise=1.6.0 # next ver: 1.81.0
11+
# No downgrades currently needed.
1412

1513
# Check project
1614
check:
@@ -32,26 +30,28 @@ fmt:
3230
# Lint workspace with Clippy
3331
clippy:
3432
cargo clippy --workspace --no-default-features
35-
cargo clippy --workspace --all-features
33+
cargo clippy --workspace
34+
# cargo clippy --workspace --all-features
3635

3736
# Test workspace without generating coverage files
3837
[private]
3938
test-no-coverage:
4039
cargo {{ toolchain }} nextest run --workspace --no-default-features
41-
cargo {{ toolchain }} nextest run --workspace --all-features
42-
cargo {{ toolchain }} test --doc --workspace --all-features
40+
# cargo {{ toolchain }} nextest run --workspace --all-features
41+
cargo {{ toolchain }} test --doc --workspace
42+
# cargo {{ toolchain }} test --doc --workspace --all-features
4343
RUSTDOCFLAGS="-D warnings" cargo {{ toolchain }} doc --workspace --no-deps --all-features
4444

4545
# Test workspace and generate coverage files
4646
test: test-no-coverage
47-
@just test-coverage-codecov
48-
@just test-coverage-lcov
47+
# @just test-coverage-codecov
48+
# @just test-coverage-lcov
4949

5050
# Test workspace using MSRV
5151
test-msrv: downgrade-for-msrv
5252
@just toolchain={{ msrv_rustup }} test-no-coverage
5353

54-
# Test workspace and generate Codecov coverage file
54+
# Test workspace and generate Codecov coverage file
5555
test-coverage-codecov:
5656
cargo {{ toolchain }} llvm-cov --workspace --all-features --codecov --output-path codecov.json
5757

tests/implication.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use contracts::*;
77
#[cfg(feature = "mirai_assertions")]
88
mod mirai_assertion_mocks;
99

10+
#[allow(clippy::nonminimal_bool)]
1011
#[test]
1112
fn test_ret_implication() {
1213
#[ensures(do_thing -> ret.is_some(), "do_thing should cause a Some(_)")]
@@ -23,6 +24,7 @@ fn test_ret_implication() {
2324
perform_thing(false);
2425
}
2526

27+
#[allow(clippy::nonminimal_bool)]
2628
#[test]
2729
fn test_ret_implication_old() {
2830
#[ensures(old(*x) % 2 == 0 -> *x % 2 == 0)]
@@ -38,6 +40,7 @@ fn test_ret_implication_old() {
3840
incr(&mut x);
3941
}
4042

43+
#[allow(clippy::nonminimal_bool)]
4144
#[test]
4245
fn test_requires_implication() {
4346
#[requires(!negative -> value >= 0)]

0 commit comments

Comments
 (0)