mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
16 lines
646 B
Rust
16 lines
646 B
Rust
#[test]
|
|
fn seq_compare() {
|
|
assert!(("hello".to_string() < "hellr".to_string()));
|
|
assert!(("hello ".to_string() > "hello".to_string()));
|
|
assert!(("hello".to_string() != "there".to_string()));
|
|
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]));
|
|
}
|