Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use assert_eq! instead of assert!
  • Loading branch information
brendanzab committed May 18, 2013
commit c1eb539e124771a3e7618d9879345ea6a6cf3ed9
14 changes: 7 additions & 7 deletions src/libcore/tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,24 +397,24 @@ impl_n_tuple!(Tuple12:
#[test]
fn test_tuple_ref() {
let x = (~"foo", ~"bar");
assert!(x.first_ref() == &~"foo");
assert!(x.second_ref() == &~"bar");
assert_eq!(x.first_ref(), &~"foo");
assert_eq!(x.second_ref(), &~"bar");
}

#[test]
#[allow(non_implicitly_copyable_typarams)]
fn test_tuple() {
assert!((948, 4039.48).first() == 948);
assert!((34.5, ~"foo").second() == ~"foo");
assert!(('a', 2).swap() == (2, 'a'));
assert_eq!((948, 4039.48).first(), 948);
assert_eq!((34.5, ~"foo").second(), ~"foo");
assert_eq!(('a', 2).swap(), (2, 'a'));
}

#[test]
fn test_clone() {
let a = (1, ~"2");
let b = a.clone();
assert!(a.first() == b.first());
assert!(a.second() == b.second());
assert_eq!(a.first(), b.first());
assert_eq!(a.second(), b.second());
}

#[test]
Expand Down