Skip to content

Commit b2d61fe

Browse files
committed
fix: tests
1 parent 126ab9f commit b2d61fe

8 files changed

Lines changed: 19 additions & 17 deletions

File tree

libs/@local/hashql/eval/tests/ui/postgres/constant-true-filter.aux.mir

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/@local/hashql/eval/tests/ui/postgres/env-captured-variable.aux.mir

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/@local/hashql/eval/tests/ui/postgres/input-parameter-exists.aux.mir

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/@local/hashql/eval/tests/ui/postgres/logical-and-inputs.aux.mir

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/@local/hashql/eval/tests/ui/postgres/mixed-sources-filter.aux.mir

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/@local/hashql/mir/src/interpret/value/int.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,8 @@ mod tests {
656656
clippy::float_cmp
657657
)]
658658

659+
use core::hash::BuildHasher as _;
660+
659661
use crate::interpret::value::{Int, Numeric};
660662

661663
#[test]
@@ -868,20 +870,19 @@ mod tests {
868870

869871
#[test]
870872
fn hash_consistent_with_eq() {
871-
use core::hash::{BuildHasher, Hash, Hasher};
872-
873873
use hashql_core::collections::FastHasher;
874874

875875
let build = FastHasher::default();
876-
let hash_of = |value: &Int| -> u64 {
877-
let mut hasher = build.build_hasher();
878-
value.hash(&mut hasher);
879-
hasher.finish()
880-
};
881876

882877
// Equal values must have equal hashes
883-
assert_eq!(hash_of(&Int::from(true)), hash_of(&Int::from(1_i32)));
884-
assert_eq!(hash_of(&Int::from(false)), hash_of(&Int::from(0_i32)));
878+
assert_eq!(
879+
build.hash_one(Int::from(true)),
880+
build.hash_one(Int::from(1_i32))
881+
);
882+
assert_eq!(
883+
build.hash_one(Int::from(false)),
884+
build.hash_one(Int::from(0_i32))
885+
);
885886
}
886887

887888
#[test]

libs/@local/hashql/mir/src/interpret/value/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ impl<'value, 'heap, A: Allocator> From<&'value Value<'heap, A>>
560560

561561
#[cfg(test)]
562562
mod tests {
563+
#![expect(clippy::min_ident_chars)]
563564
use core::cmp::Ordering;
564565

565566
use super::{Int, Num, Value};

libs/@local/hashql/mir/tests/ui/pass/pre_inline/chain-simplification.stdout

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)