This is an automated email from the ASF dual-hosted git repository. tisonkun pushed a commit to branch codex/analyze-crate-tests in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git
commit 65db3097bbdf6f425446a40d88681b88efb1ae41 Author: tison <[email protected]> AuthorDate: Tue Jul 28 14:35:34 2026 +0800 test(cpc): assert union results precisely --- datasketches/tests/cpc_test/union.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datasketches/tests/cpc_test/union.rs b/datasketches/tests/cpc_test/union.rs index 8f871ee..aaa5fa3 100644 --- a/datasketches/tests/cpc_test/union.rs +++ b/datasketches/tests/cpc_test/union.rs @@ -46,7 +46,7 @@ fn test_two_values() { let result = union.to_sketch(); assert!(!result.is_empty()); assert_that!( - sketch.estimate(), + result.estimate(), near(2.0, RELATIVE_ERROR_FOR_LG_K_11 * 2.0) ); } @@ -140,7 +140,7 @@ fn test_reduce_k_sparse() { assert_eq!(result.lg_k(), 11); assert_that!( result.estimate(), - near(1000.0, RELATIVE_ERROR_FOR_LG_K_11 * 10000.0) + near(1000.0, RELATIVE_ERROR_FOR_LG_K_11 * 1000.0) ); } @@ -164,7 +164,7 @@ fn test_reduce_k_window() { assert_eq!(result.lg_k(), 11); assert_that!( result.estimate(), - near(1000.0, RELATIVE_ERROR_FOR_LG_K_11 * 10000.0) + near(1000.0, RELATIVE_ERROR_FOR_LG_K_11 * 1000.0) ); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
