Skip to content

Commit 824a2ee

Browse files
authored
Merge pull request #43 from mgautierfr/r/0.3.0
New release 0.3.0
2 parents 2e0c5b3 + fe014ff commit 824a2ee

File tree

11 files changed

+91
-9
lines changed

11 files changed

+91
-9
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545

4646
- name: Run clippy
4747
if: ${{ matrix.toolchain == 'stable' }}
48-
run: cargo clippy
48+
run: |
49+
cargo clippy --all
50+
cargo clippy --tests
4951
5052
- name: Run audit
5153
run: cargo audit

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44

55
[workspace.package]
66
edition = "2024"
7-
version = "0.2.0"
7+
version = "0.3.0"
88
authors = ["Matthieu Gautier <[email protected]>"]
99
repository = "https://github.com/mgautierfr/rustest"
1010
homepage = "https://github.com/mgautierfr/rustest"

Changelog.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
# Rustest 0.2.0
1+
# Rustest's Changelog
2+
3+
## [0.3.0] - 2025-06-04
4+
5+
### Added
6+
7+
- New `TempDir` fixture
8+
- New `MatrixUnique` scope (use "matrix" in macro fixture definition)
9+
- Allow custom visibility for Param
10+
- Allow user to give a explicit name for the params
11+
- Various improvements of the CI and github tools (thanks to @rursprung)
12+
13+
### Changed
14+
- `Unique`("unique") scope is now called `Once`("once").
15+
- Introduce `ParamName` trait. User should implement `ParamName` instead of `TestName` when needed.
16+
- Test functions do not need to be `UnwindSafe`. We assume they are with `AssertUnwindSafe`.
17+
18+
### Fixed
19+
20+
- Fix "unique" fixture to not share states.
21+
- Fix `TempFile` fixture to not share states.
22+
- Fix `Global` fixture, to cache the subfixture (as unique scope do not share scope).
23+
24+
## [0.2.0] - 2025-05-19
225

326
- Support unittest.
427
- Better testing of rustest
@@ -13,3 +36,7 @@
1336
- Introduce new crate rustest-fixtures, a collection of standard fixtures.
1437
- Add support for (conditional) ignore test.
1538
- Lot of code improvements.
39+
40+
41+
[0.3.0] https://github.com/mgautierfr/rustest/compare/0.2.0...0.3.0
42+
[0.2.0] https://github.com/mgautierfr/rustest/compare/0.1.0...0.2.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fn test_number_string(text: ANumberAsString) {
273273
#[fixture]
274274
fn NumberAsString<Source>(number: Source) -> String
275275
where
276-
Source: rustest::Fixture<Type =u32>
276+
Source: rustest::SubFixture<Type =u32>
277277
{
278278
format!("This is a number : {}", *number)
279279
}

rustest-fixtures/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ keywords.workspace = true
1111
categories.workspace = true
1212

1313
[dependencies]
14-
rustest = { version = "0.2.0", path = "../rustest" }
14+
rustest = { version = "0.3.0", path = "../rustest" }
1515
tempfile = "3.19.1"

rustest-fixtures/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[![Crate][crate-image]][crate-link]
2+
[![Docs][docs-image]][docs-link]
3+
[![Status][test-action-image]][test-action-link]
4+
[![Apache 2.0 Licensed][license-apache-image]][license-apache-link]
5+
[![MIT Licensed][license-mit-image]][license-mit-link]
6+
7+
8+
# rustest-fixtures: A set of fixtures for rustest
9+
10+
11+
This crate provides a set of "standard" fixtures to use with rustest.
12+
13+
For now, only three fixtures are provided:
14+
15+
- TempFile: Get a temporary file for your tests
16+
- TempDir: Get a temporary directory for your tests
17+
- Global: Put a fixture in the global scope
18+
19+
## Contributing
20+
21+
Rustest is pretty young. Issue reports and PR are welcomed !
22+
23+
24+
## License
25+
26+
Licensed under either of
27+
28+
* Apache License, Version 2.0, ([LICENSE-APACHE](/LICENSE-APACHE) or [license-apache-link](http://www.apache.org/licenses/LICENSE-2.0))
29+
30+
* MIT license [LICENSE-MIT](/LICENSE-MIT) or [license-MIT-link](http://opensource.org/licenses/MIT) at your option.
31+
32+
[//]: # (links)
33+
34+
[crate-image]: https://img.shields.io/crates/v/rustest.svg
35+
[crate-link]: https://crates.io/crates/rustest
36+
[docs-image]: https://docs.rs/rustest/badge.svg
37+
[docs-link]: https://docs.rs/rustest/
38+
[test-action-image]: https://github.com/mgautierfr/rustest/workflows/Cargo%20Build%20&%20Test/badge.svg
39+
[test-action-link]: https://github.com/mgautierfr/rustest/actions/workflows/ci.yml?query=workflow%3ACargo
40+
[license-apache-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg
41+
[license-mit-image]: https://img.shields.io/badge/license-MIT-blue.svg
42+
[license-apache-link]: http://www.apache.org/licenses/LICENSE-2.0
43+
[license-MIT-link]: http://opensource.org/licenses/MIT
44+

rustest-macro/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

rustest-macro/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# rustest-macro
2+
3+
Macro crate for [rustest](https://crates.io/crates/rustest).

rustest-testing/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
# rustest-testing: Crate to test rustest.
3+
4+
This crate is not intended to be published.
5+
6+
This of rustest-testing as the `tests` directory of classical crates.

rustest-testing/tests/scope_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ impl Collector {
4343
for (key, value) in stderr
4444
.split('\n')
4545
.filter(|l| !l.is_empty())
46-
.map(|l| l.split_once(|c| c == ':').unwrap())
46+
.map(|l| l.split_once(':').unwrap())
4747
.map(|(key, value)| (key.to_string(), value.parse().expect("Should parse a u32")))
4848
{
49-
map.entry(key).or_insert_with(|| Vec::new()).push(value)
49+
map.entry(key).or_insert_with(Vec::new).push(value)
5050
}
5151
for vec in map.values_mut() {
5252
vec.sort();

0 commit comments

Comments
 (0)