Skip to content

Commit

Permalink
assert!(result.is_ok()) -> result.unwrap()
Browse files Browse the repository at this point in the history
Summary: Better error message if test fails.

Reviewed By: iguridi

Differential Revision: D65951919

fbshipit-source-id: c9102bbd8a146ba98ed725b6f61bbba539c308f2
  • Loading branch information
stepancheg authored and facebook-github-bot committed Nov 14, 2024
1 parent 6c422e2 commit 07c3574
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/buck2_build_api_tests/src/actions/calculation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ async fn test_build_action() -> anyhow::Result<()> {
let result =
ActionCalculation::build_action(&mut dice_computations, registered_action.key()).await;

assert!(result.is_ok());
result.unwrap();

assert_eq!(
dry_run_tracker.lock().unwrap()[0],
Expand Down Expand Up @@ -355,7 +355,7 @@ async fn test_build_artifact() -> anyhow::Result<()> {
)
.await;

assert!(result.is_ok());
result.unwrap();

assert_eq!(
dry_run_tracker.lock().unwrap()[0],
Expand Down Expand Up @@ -403,7 +403,7 @@ async fn test_ensure_artifact_build_artifact() -> anyhow::Result<()> {
)
.await;

assert!(result.is_ok());
result.unwrap();

assert_eq!(
dry_run_tracker.lock().unwrap()[0],
Expand Down

0 comments on commit 07c3574

Please sign in to comment.