Skip to content

Commit

Permalink
Disable trace-level logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
gendx committed Sep 13, 2024
1 parent c7fb3cb commit 6855895
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rust-version = "1.75.0"
[dependencies]
clap = { version = "=4.4", features = ["derive"] }
env_logger = "0.10"
log = "0.4"
log = { version = "0.4", features = ["max_level_debug"] }
num = "0.4"
rayon = "1"
regex = "1.10"
Expand Down
25 changes: 3 additions & 22 deletions src/arithmetic/float64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ mod test {
use crate::{
big_integer_tests, big_numeric_tests, integer_tests, numeric_benchmarks, numeric_tests,
};
use log::Level::Trace;

integer_tests!(
f64,
Expand Down Expand Up @@ -216,33 +215,15 @@ mod test {

let logger = ThreadLocalLogger::start();
f64::assert_eq(1.0, 1.0 + f64::EPSILON, "Error message");
logger.check_target_logs(
"stv_rs::arithmetic::float64",
[(
Trace,
"Error message: Failed comparison 1 != 1.0000000000000002 (error = 1 * eps)",
)],
);
logger.check_target_logs("stv_rs::arithmetic::float64", []);

let logger = ThreadLocalLogger::start();
f64::assert_eq(1.0, 1.0 + 999.0 * f64::EPSILON, "Error message");
logger.check_target_logs(
"stv_rs::arithmetic::float64",
[(
Trace,
"Error message: Failed comparison 1 != 1.0000000000002218 (error = 999 * eps)",
)],
);
logger.check_target_logs("stv_rs::arithmetic::float64", []);

let logger = ThreadLocalLogger::start();
f64::assert_eq(1.0, 1.0 + 1000.0 * f64::EPSILON, "Error message");
logger.check_target_logs(
"stv_rs::arithmetic::float64",
[(
Trace,
"Error message: Failed comparison 1 != 1.000000000000222 (error = 1000 * eps)",
)],
);
logger.check_target_logs("stv_rs::arithmetic::float64", []);
}

#[test]
Expand Down

0 comments on commit 6855895

Please sign in to comment.