Update Rust crate googletest to v0.13.0 #10081
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
=0.12.0->=0.13.0Release Notes
google/googletest-rust (googletest)
v0.13.0Compare Source
API Changes
Note that the minimum supported Rust version has increased from 1.66 to 1.70.
Rename
#[googletest::test]to#[googletest::gtest]and add it to the prelude.Note that
#[googletest::test]will not be deprecated because this spelling is useful for compatibility with the rstest crate.Add
assert_pred!to prelude.New Features
Add test fixture support for synchronous tests.
Various traits to represent different types of test fixtures have been added. The core
Fixturetrait may be used like this:ConsumableFixturehas only aset_upmethod and notear_downmethod.FixtureOf<T>adapts aT: Defaultinto aConsumableFixture.StaticFixturehas aset_up_oncemethod which is called only once before any tests are run.Add
impl Matcher<&()> for ().Handle the printing of arguments passed to gtest macros that do not implement
Debugusing inherent method specialization.Generalize
verify_pred!such that it can take any expression and provide meaningful output of intermediate values on failure.Add support for printing the two sides of a binary operator and traversing inside a unary operator in
verify_pred!.For example, an assertion of the form
verify_pred!(a == b)will print both the left and right-hand sides when it fails.Add support for sequences (ordered and unordered) to
expect_that!andassert_that!.Add
result_of!andresult_of_ref!matchers for matching with a function applied to the value first.Example:
verify_that!(100, result_of!(|value| value + 1, eq(101)))?;will pass.Add special cases to
verify_eq!so that, when doingeqmatching on sequences of tuple elements, the matcher applies tuple matching, distributingeqpointwise.This improves the ergonomics of tests that check for tuple contents, such as:
because the matcher for
&stris compatible with&String.The specialization applies on the inner structure; without it, the general matcher on tuples doesn't apply in the above case due to the definition of
PartialEqon whole tuples, which is currently limited by rust-lang/rust#105092.Add
is_true!andis_false!Boolean matchers.Bug Fixes
Fix
#[gtest]failing to compile when a user-declaredstdorcoremodule is in scope.Fix stack overflow that occurs when
verify_pred!is used with nested function calls.Fix bug in
summarize_diffwhere actual and expected strings were considered equal despite only one of the two ending in a newline character.Full Changelog: google/googletest-rust@v0.12.0...v0.13.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.