Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f11e0042 authored by Martin Geisler's avatar Martin Geisler
Browse files

pdl: simplify ‘assert_eq_with_diff’

Before we would print the full “left” and “right” texts. However, with
snapshot testing (coming in https://r.android.com/c/2098984/3) this is
not really necessary any longer.

Bug: 228307941
Test: atest pdl_inline_tests
Change-Id: I8b1c348ecef64ff5ab677e2040eb645d9af4e236
parent 87f17efb
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -93,13 +93,5 @@ pub fn diff(left: &str, right: &str) -> String {
/// Compare two strings and output a diff if they are not equal.
#[track_caller]
pub fn assert_eq_with_diff(left: &str, right: &str) {
    assert!(
        left == right,
        "texts did not match, left:\n{}\n\n\
             right:\n{}\n\n\
             diff:\n{}\n",
        left,
        right,
        diff(left, right)
    );
    assert!(left == right, "texts did not match, diff:\n{}\n", diff(left, right));
}