Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1455 from sudheesh001/assert_fixes
Browse files Browse the repository at this point in the history
Replace equality condition of assert --> assert_eq
  • Loading branch information
ashleymichal authored Jul 16, 2020
2 parents ac5213e + 73931ea commit 5062ecb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/settings/toml/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn it_builds_from_environments_config_with_kv() {
if target.kv_namespaces.is_empty() {
panic!("found no kv namespaces");
} else {
assert!(target.kv_namespaces.len() == 2);
assert_eq!(target.kv_namespaces.len(), 2);
assert!(target.kv_namespaces.contains(&kv_1));
assert!(target.kv_namespaces.contains(&kv_2));
}
Expand All @@ -70,7 +70,7 @@ fn it_builds_from_environments_config_with_kv() {
if target.kv_namespaces.is_empty() {
panic!("found no kv namespaces");
} else {
assert!(target.kv_namespaces.len() == 2);
assert_eq!(target.kv_namespaces.len(), 2);
assert!(target.kv_namespaces.contains(&kv_1));
assert!(target.kv_namespaces.contains(&kv_2));
}
Expand Down
6 changes: 3 additions & 3 deletions src/sites/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ mod tests {
}

fn check_kv_pairs_equality(expected: Vec<KeyValuePair>, actual: Vec<KeyValuePair>) {
assert!(expected.len() == actual.len());
assert_eq!(expected.len(), actual.len());
for (idx, pair) in expected.into_iter().enumerate() {
// Ensure the expected key and value was returned in the filtered pair list
// Awkward field-by-field comparison below courtesy of not yet implementing
// PartialEq for KeyValuePair in cloudflare-rs :)
// TODO: (gabbi) Implement PartialEq for KeyValuePair in cloudflare-rs.
assert!(pair.key == actual[idx].key);
assert!(pair.value == actual[idx].value);
assert_eq!(pair.key, actual[idx].key);
assert_eq!(pair.value, actual[idx].value);
}
}
}

0 comments on commit 5062ecb

Please sign in to comment.