2024-04-28 19:37:14 +00:00
|
|
|
#[test]
|
|
|
|
fn seq_compare() {
|
2014-05-25 10:10:11 +00:00
|
|
|
assert!(("hello".to_string() < "hellr".to_string()));
|
|
|
|
assert!(("hello ".to_string() > "hello".to_string()));
|
|
|
|
assert!(("hello".to_string() != "there".to_string()));
|
2016-10-29 21:54:04 +00:00
|
|
|
assert!((vec![1, 2, 3, 4] > vec![1, 2, 3]));
|
|
|
|
assert!((vec![1, 2, 3] < vec![1, 2, 3, 4]));
|
|
|
|
assert!((vec![1, 2, 4, 4] > vec![1, 2, 3, 4]));
|
|
|
|
assert!((vec![1, 2, 3, 4] < vec![1, 2, 4, 4]));
|
|
|
|
assert!((vec![1, 2, 3] <= vec![1, 2, 3]));
|
|
|
|
assert!((vec![1, 2, 3] <= vec![1, 2, 3, 3]));
|
|
|
|
assert!((vec![1, 2, 3, 4] > vec![1, 2, 3]));
|
|
|
|
assert_eq!(vec![1, 2, 3], vec![1, 2, 3]);
|
|
|
|
assert!((vec![1, 2, 3] != vec![1, 1, 3]));
|
2011-08-19 22:16:48 +00:00
|
|
|
}
|