Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: replace assert!(<actual> == <real>) by assert_eq!(<actual>, <real>) in some tests #910

Merged
merged 3 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion crates/iceberg/src/arrow/record_batch_projector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ mod test {
RecordBatchProjector::new(schema.clone(), &[1, 3], field_id_fetch_func, |_| true)
.unwrap();

assert!(projector.field_indices.len() == 2);
assert_eq!(projector.field_indices.len(), 2);
assert_eq!(projector.field_indices[0], vec![0]);
assert_eq!(projector.field_indices[1], vec![0, 1]);

Expand Down
20 changes: 10 additions & 10 deletions crates/iceberg/src/spec/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2691,21 +2691,21 @@ mod tests {
}
let res = writer.write_manifest_file().await.unwrap();

assert!(res.partitions.len() == 3);
assert!(res.partitions[0].lower_bound == Some(Datum::int(1111)));
assert!(res.partitions[0].upper_bound == Some(Datum::int(2021)));
assert_eq!(res.partitions.len(), 3);
assert_eq!(res.partitions[0].lower_bound, Some(Datum::int(1111)));
assert_eq!(res.partitions[0].upper_bound, Some(Datum::int(2021)));
assert!(!res.partitions[0].contains_null);
assert!(res.partitions[0].contains_nan == Some(false));
assert_eq!(res.partitions[0].contains_nan, Some(false));

assert!(res.partitions[1].lower_bound == Some(Datum::float(1.0)));
assert!(res.partitions[1].upper_bound == Some(Datum::float(15.5)));
assert_eq!(res.partitions[1].lower_bound, Some(Datum::float(1.0)));
assert_eq!(res.partitions[1].upper_bound, Some(Datum::float(15.5)));
assert!(res.partitions[1].contains_null);
assert!(res.partitions[1].contains_nan == Some(true));
assert_eq!(res.partitions[1].contains_nan, Some(true));

assert!(res.partitions[2].lower_bound == Some(Datum::double(1.0)));
assert!(res.partitions[2].upper_bound == Some(Datum::double(25.5)));
assert_eq!(res.partitions[2].lower_bound, Some(Datum::double(1.0)));
assert_eq!(res.partitions[2].upper_bound, Some(Datum::double(25.5)));
assert!(!res.partitions[2].contains_null);
assert!(res.partitions[2].contains_nan == Some(false));
assert_eq!(res.partitions[2].contains_nan, Some(false));
}

#[tokio::test]
Expand Down
2 changes: 1 addition & 1 deletion crates/integration_tests/tests/scan_all_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ async fn test_scan_all_type() {
.into_iter(),
)
.unwrap();
assert!(col12.data_type() == &DataType::FixedSizeBinary(10));
assert_eq!(col12.data_type(), &DataType::FixedSizeBinary(10));
let col13 = FixedSizeBinaryArray::try_from_iter(
vec![
Uuid::new_v4().as_bytes().to_vec(),
Expand Down
Loading