From 467063752bf53baad3971b13ea14533c1a7db0b4 Mon Sep 17 00:00:00 2001 From: Vedat Can Keklik Date: Tue, 26 Nov 2024 14:20:03 +0300 Subject: [PATCH] fix: Improved tests with hash --- lykiadb-lang/tests/lang/generic/expr.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lykiadb-lang/tests/lang/generic/expr.rs b/lykiadb-lang/tests/lang/generic/expr.rs index 0aaa851d..e6c044dc 100644 --- a/lykiadb-lang/tests/lang/generic/expr.rs +++ b/lykiadb-lang/tests/lang/generic/expr.rs @@ -47,6 +47,12 @@ fn different_exprs_with_same_ids_should_not_be_equal() { let e1 = create_simple_add_expr(1, 1.0, 2.0); assert_ne!(e0, e1); + + let mut set: HashSet = HashSet::new(); + + set.insert(e0); + + assert!(!set.contains(&e1)); } @@ -58,4 +64,10 @@ fn mirrored_exprs_should_not_be_equal() { let e1 = create_simple_add_expr(1, 1.0, 2.0); assert_ne!(e0, e1); + + let mut set: HashSet = HashSet::new(); + + set.insert(e0); + + assert!(!set.contains(&e1)); } \ No newline at end of file