Skip to content

Commit

Permalink
Improve pop tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ygf11 committed Apr 28, 2022
1 parent 898c7c8 commit e4f2354
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/it/array/binary/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fn pop_all_some() {
a.push(Some(b"first"));
a.push(Some(b"second"));
a.push(Some(b"third"));
a.push(Some(b"firth"));
a.push(Some(b"fourth"));

for _ in 0..4 {
a.push(Some(b"aaaa"));
Expand All @@ -113,7 +113,7 @@ fn pop_all_some() {
assert_eq!(a.pop(), Some(b"aaaa".to_vec()));
assert_eq!(a.len(), 5);
assert_eq!(a.pop(), Some(b"aaaa".to_vec()));
assert_eq!(a.pop(), Some(b"firth".to_vec()));
assert_eq!(a.pop(), Some(b"fourth".to_vec()));
assert_eq!(a.pop(), Some(b"third".to_vec()));
assert_eq!(a.pop(), Some(b"second".to_vec()));
assert_eq!(a.pop(), Some(b"first".to_vec()));
Expand Down
8 changes: 4 additions & 4 deletions tests/it/array/utf8/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ fn pop_all_some() {
a.push(Some("first"));
a.push(Some("second"));
a.push(Some("third"));
a.push(Some("firth"));
a.push(Some("fourth"));
for _ in 0..4 {
a.push(Some("aaaa"));
}
a.push(Some("bbbb"));
a.push(Some("こんにちは"));

assert_eq!(a.pop(), Some("bbbb".to_string()));
assert_eq!(a.pop(), Some("こんにちは".to_string()));
assert_eq!(a.pop(), Some("aaaa".to_string()));
assert_eq!(a.pop(), Some("aaaa".to_string()));
assert_eq!(a.pop(), Some("aaaa".to_string()));
assert_eq!(a.len(), 5);
assert_eq!(a.pop(), Some("aaaa".to_string()));
assert_eq!(a.pop(), Some("firth".to_string()));
assert_eq!(a.pop(), Some("fourth".to_string()));
assert_eq!(a.pop(), Some("third".to_string()));
assert_eq!(a.pop(), Some("second".to_string()));
assert_eq!(a.pop(), Some("first".to_string()));
Expand Down

0 comments on commit e4f2354

Please sign in to comment.