加点别的test

This commit is contained in:
shenjack 2024-10-14 23:36:51 +08:00
parent 9fdaa58a06
commit f4a828f4da
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 17 additions and 1 deletions

View File

@ -279,7 +279,7 @@ pub fn schdule_threads(cli_arg: Command, out_path: PathBuf) {
/// 所有的状态输出都在子线程, 也就是这里
///
/// 1. 通过 `Receiver` 获取到主线程的数据
///
///
/// 获取到数据后, 开始计算
/// 计算完一个 batch 后, 输出一次状态
/// 这里的状态是在所有运算线程中共享的一个状态

View File

@ -707,6 +707,22 @@ mod test {
#[test]
fn val_test() {
let team = TeamNamer::new_unchecked("x");
let team_val: Vec<u8> = vec![
0, 59, 5, 27, 36, 119, 125, 25, 127, 133, 143, 18, 88, 163, 214, 134, 72, 85, 55, 103, 58, 80, 12, 3, 197, 86, 112,
227, 37, 180, 202, 184, 126, 15, 169, 96, 35, 149, 160, 90, 130, 10, 207, 254, 31, 253, 194, 150, 198, 111, 161, 87,
128, 129, 24, 73, 238, 34, 245, 168, 52, 42, 232, 142, 152, 135, 201, 132, 200, 144, 203, 138, 154, 141, 109, 47,
155, 93, 145, 82, 185, 113, 186, 69, 217, 166, 210, 92, 131, 183, 151, 171, 251, 40, 98, 195, 41, 7, 244, 30, 26, 65,
179, 16, 100, 218, 211, 120, 45, 237, 182, 8, 137, 107, 67, 61, 176, 249, 190, 123, 122, 243, 70, 247, 174, 241, 209,
148, 228, 50, 208, 14, 51, 146, 117, 68, 162, 234, 102, 104, 62, 11, 76, 84, 9, 139, 224, 235, 108, 44, 78, 222, 242,
167, 89, 172, 114, 115, 221, 233, 140, 193, 255, 191, 4, 188, 66, 29, 6, 64, 204, 192, 178, 77, 216, 196, 57, 164,
95, 75, 229, 212, 223, 215, 97, 136, 220, 38, 219, 94, 158, 252, 226, 21, 239, 157, 32, 39, 124, 46, 105, 175, 230,
156, 248, 106, 116, 43, 101, 250, 231, 28, 147, 173, 177, 187, 20, 181, 205, 22, 91, 83, 225, 1, 81, 99, 199, 246,
63, 48, 54, 13, 118, 79, 19, 170, 153, 165, 213, 110, 23, 121, 206, 159, 236, 2, 33, 71, 49, 56, 74, 60, 189, 53,
240, 17,
];
assert_eq!(team.clone_vals().to_vec(), team_val);
let namer = Namer::new_from_team_namer_unchecked(&team, "x");
let val_vec: Vec<u8> = vec![