Update test suite to nightly-2024-06-12
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Tolnay · committed by David Tolnay · parent 5a88bc4 · Browse files · 1 file·+11 added−11 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+11 added−11 removed
- tests:+11 added−11 removed
Provenance
- Commit
a9d952e- Tree
af46d24- Author
David Tolnay <dtolnay@gmail.com>- Committer
David Tolnay <dtolnay@gmail.com>- Parent
5a88bc4
1 file changed+11 added−11 removed
modified:tests/test_ensure.rs+11 added-11 removed
151 unmodified lines152 // Must not partition as `(S + move) || (1 == 1)` by treating move as an153 // identifier, nor as `(S + move || 1) == (1)` by misinterpreting the154 // closure precedence.155 let test = || Ok(ensure!(S + move || 1 == 1));156- assert_err(test, "Condition failed: `S + (move || 1 == 1)`");156+ assert_err(test, "Condition failed: `S + move || 1 == 1`");157 158 let test = || Ok(ensure!(S + || 1 == 1));159- assert_err(test, "Condition failed: `S + (|| 1 == 1)`");159+ assert_err(test, "Condition failed: `S + || 1 == 1`");160 161 // Must not partition as `S + ((move | ()) | 1) == 1` by treating those162 // pipes as bitwise-or.163 let test = || Ok(ensure!(S + move |()| 1 == 1));164- assert_err(test, "Condition failed: `S + (move |()| 1 == 1)`");164+ assert_err(test, "Condition failed: `S + move |()| 1 == 1`");165 166 let test = || Ok(ensure!(S + |()| 1 == 1));167- assert_err(test, "Condition failed: `S + (|()| 1 == 1)`");167+ assert_err(test, "Condition failed: `S + |()| 1 == 1`");168 }169 170 #[test]171 fn test_unary() {51 unmodified lines223 #[rustfmt::skip]224 let test = || Ok(ensure!(if let | 1 | 2 = 2 {}.t(1) == 2));225 assert_err(226 test,227- "Condition failed: `if let 1 | 2 = 2 {}.t(1) == 2` (1 vs 2)",227+ "Condition failed: `if let | 1 | 2 = 2 {}.t(1) == 2` (1 vs 2)",228 );229 }230 231 #[test]36 unmodified lines268 #[rustfmt::skip]269 let test = || Ok(ensure!(for | _x in iter::once(0) {}.t(1) == 2));270 assert_err(271 test,272- "Condition failed: `for _x in iter::once(0) {}.t(1) == 2` (1 vs 2)",272+ "Condition failed: `for | _x in iter::once(0) {}.t(1) == 2` (1 vs 2)",273 );274 275 #[rustfmt::skip]276 let test = || Ok(ensure!(for true | false in iter::empty() {}.t(1) == 2));8 unmodified lines285 #[rustfmt::skip]286 let test = || Ok(ensure!(match 1 == 1 { true => 1, false => 0 } == 2));287 assert_err(288 test,289- "Condition failed: `match 1 == 1 { true => 1, false => 0, } == 2` (1 vs 2)",289+ "Condition failed: `match 1 == 1 { true => 1, false => 0 } == 2` (1 vs 2)",290 );291 }292 293 #[test]48 unmodified lines342 #[rustfmt::skip]343 let test = || Ok(ensure!(Error::msg::<&str,>.t(1) == 2));344 assert_err(345 test,346- "Condition failed: `Error::msg::<&str>.t(1) == 2` (1 vs 2)",346+ "Condition failed: `Error::msg::<&str,>.t(1) == 2` (1 vs 2)",347 );348 349 let test = || Ok(ensure!(Error::msg::<<str as ToOwned>::Owned>.t(1) == 2));350 assert_err(10 unmodified lines361 #[rustfmt::skip]362 let test = || Ok(ensure!(Chain::<'static,>::new.t(1) == 2));363 assert_err(364 test,365- "Condition failed: `Chain::<'static>::new.t(1) == 2` (1 vs 2)",365+ "Condition failed: `Chain::<'static,>::new.t(1) == 2` (1 vs 2)",366 );367 368 fn f<const I: isize>() {}369 let test = || Ok(ensure!(f::<1>() != ()));23 unmodified lines393 assert_err(test, "Condition failed: `E::U::<u8> > E::U` (U vs U)");394 395 #[rustfmt::skip]396 let test = || Ok(ensure!(E::U::<u8,>>E::U));397- assert_err(test, "Condition failed: `E::U::<u8> > E::U` (U vs U)");397+ assert_err(test, "Condition failed: `E::U::<u8,> > E::U` (U vs U)");398 399 let test = || Ok(ensure!(Generic::<dyn Debug + Sync> != Generic));400 assert_err(401 test,13 unmodified lines415 ))416 };417 assert_err(418 test,419- "Condition failed: `Generic::<dyn Fn() + ::std::marker::Sync> != Generic` (Generic vs Generic)",419+ "Condition failed: `Generic::<dyn Fn::() + ::std::marker::Sync> != Generic` (Generic vs Generic)",420 );421 }422 423 #[test]318 unmodified lines