Remove redundant test setup

One function calls setup twice, and the other one is not a test so should
not be prefixed with "test_".
This commit is contained in:
Johannes Altmanninger 2024-10-10 09:07:39 +02:00
parent a139d204c0
commit 69380c6c92
2 changed files with 2 additions and 5 deletions

View File

@ -14,8 +14,6 @@ fn test_string() {
use crate::tests::prelude::*;
use crate::wchar::prelude::*;
let _cleanup = test_init();
// avoid 1.3k L!()'s
macro_rules! test_cases {
([$($x:expr),*], $rc:expr, $out:expr) => { (vec![$(L!($x)),*], $rc, L!($out)) };

View File

@ -227,8 +227,7 @@ fn generate_history_lines(item_count: usize, idx: usize) -> Vec<WString> {
result
}
fn test_history_races_pound_on_history(item_count: usize, idx: usize) {
let _cleanup = test_init();
fn pound_on_history(item_count: usize, idx: usize) {
// Called in child thread to modify history.
let hist = History::new(L!("race_test"));
let hist_lines = generate_history_lines(item_count, idx);
@ -272,7 +271,7 @@ fn test_history_races() {
let mut children = Vec::with_capacity(RACE_COUNT);
for i in 0..RACE_COUNT {
children.push(std::thread::spawn(move || {
test_history_races_pound_on_history(ITEM_COUNT, i);
pound_on_history(ITEM_COUNT, i);
}));
}