Skip to content

Commit

Permalink
Added two new examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Aug 23, 2022
1 parent 4c1bfb5 commit 63eef1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/no-debug.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
struct TypeWithoutDebug;

impl PartialEq for TypeWithoutDebug {
fn eq(&self, _other: &Self) -> bool {
false
}
}

fn main() {
similar_asserts::assert_eq!(TypeWithoutDebug, TypeWithoutDebug);
}
4 changes: 4 additions & 0 deletions examples/string.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
let reference = "Hello\nWorld".to_string();
similar_asserts::assert_eq!(reference, "Goodbye\nWorld");
}

0 comments on commit 63eef1b

Please sign in to comment.