From c3c9cc38207c1e786d2f1aad300713515e66b627 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:34:56 +0000 Subject: [PATCH] chore: update variable names in stdlib tests to be more correct (#6419) --- noir_stdlib/src/field/mod.nr | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/noir_stdlib/src/field/mod.nr b/noir_stdlib/src/field/mod.nr index 4b89cae4f30..a5c1ff7bb62 100644 --- a/noir_stdlib/src/field/mod.nr +++ b/noir_stdlib/src/field/mod.nr @@ -285,9 +285,9 @@ mod tests { // docs:start:to_be_bytes_example fn test_to_be_bytes() { let field = 2; - let bits: [u8; 8] = field.to_be_bytes(); - assert_eq(bits, [0, 0, 0, 0, 0, 0, 0, 2]); - assert_eq(Field::from_be_bytes::<8>(bits), field); + let bytes: [u8; 8] = field.to_be_bytes(); + assert_eq(bytes, [0, 0, 0, 0, 0, 0, 0, 2]); + assert_eq(Field::from_be_bytes::<8>(bytes), field); } // docs:end:to_be_bytes_example @@ -295,9 +295,9 @@ mod tests { // docs:start:to_le_bytes_example fn test_to_le_bytes() { let field = 2; - let bits: [u8; 8] = field.to_le_bytes(); - assert_eq(bits, [2, 0, 0, 0, 0, 0, 0, 0]); - assert_eq(Field::from_le_bytes::<8>(bits), field); + let bytes: [u8; 8] = field.to_le_bytes(); + assert_eq(bytes, [2, 0, 0, 0, 0, 0, 0, 0]); + assert_eq(Field::from_le_bytes::<8>(bytes), field); } // docs:end:to_le_bytes_example @@ -305,9 +305,9 @@ mod tests { // docs:start:to_be_radix_example fn test_to_be_radix() { let field = 2; - let bits: [u8; 8] = field.to_be_radix(256); - assert_eq(bits, [0, 0, 0, 0, 0, 0, 0, 2]); - assert_eq(Field::from_be_bytes::<8>(bits), field); + let bytes: [u8; 8] = field.to_be_radix(256); + assert_eq(bytes, [0, 0, 0, 0, 0, 0, 0, 2]); + assert_eq(Field::from_be_bytes::<8>(bytes), field); } // docs:end:to_be_radix_example @@ -315,9 +315,9 @@ mod tests { // docs:start:to_le_radix_example fn test_to_le_radix() { let field = 2; - let bits: [u8; 8] = field.to_le_radix(256); - assert_eq(bits, [2, 0, 0, 0, 0, 0, 0, 0]); - assert_eq(Field::from_le_bytes::<8>(bits), field); + let bytes: [u8; 8] = field.to_le_radix(256); + assert_eq(bytes, [2, 0, 0, 0, 0, 0, 0, 0]); + assert_eq(Field::from_le_bytes::<8>(bytes), field); } // docs:end:to_le_radix_example