From 87501b5c94bb22add7e054531887a1457b117412 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sat, 28 Dec 2024 22:28:50 -0500 Subject: [PATCH] test: fix broken nnue binary test --- src/nnue.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nnue.rs b/src/nnue.rs index a251d22..ffceb69 100644 --- a/src/nnue.rs +++ b/src/nnue.rs @@ -80,12 +80,13 @@ impl Display for InputTensor { #[cfg(test)] mod tests { use super::*; + #[test] fn test_to_binary_tensor() { // more of a sanity check than a test let board = Board::from_fen("8/8/8/8/8/8/8/1b6 w - - 0 1").unwrap(); let tensor = InputTensor::from_board(&board); let mut expected = [false; INP_TENSOR_SIZE]; - expected[1 + 1 + INP_TENSOR_SIZE / 2] = true; + expected[INP_TENSOR_SIZE / N_COLORS + 1 + N_SQUARES] = true; assert_eq!(tensor.0, expected); } }