Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit 15b3f8e

Browse files
authored
Fix little-endian to big-endian representation in tests (#1012)
1 parent 181e3ed commit 15b3f8e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

zkevm-circuits/src/evm_circuit/execution/sdiv_smod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ mod test {
272272
test_ok(OpcodeId::SDIV, 0xABC.into(), 0.into());
273273
// (1 << 255) + (7 << 128)
274274
let mut x = [0u8; 32];
275-
x[31] = 128u8;
276-
x[16] = 7u8;
275+
x[0] = 128u8;
276+
x[15] = 7u8;
277277
test_ok(OpcodeId::SDIV, Word::from_big_endian(&x), 0x1234.into());
278278
test_ok(
279279
OpcodeId::SDIV,
@@ -287,7 +287,7 @@ mod test {
287287
);
288288
// 1 << 255
289289
let mut x = [0u8; 32];
290-
x[31] = 128u8;
290+
x[0] = 128u8;
291291
test_ok(
292292
OpcodeId::SDIV,
293293
Word::from_big_endian(&x),
@@ -310,8 +310,8 @@ mod test {
310310
test_ok(OpcodeId::SMOD, 0xABC.into(), 0.into());
311311
// (1 << 255) + (7 << 128)
312312
let mut x = [0u8; 32];
313-
x[31] = 128u8;
314-
x[16] = 7u8;
313+
x[0] = 128u8;
314+
x[15] = 7u8;
315315
test_ok(OpcodeId::SMOD, Word::from_big_endian(&x), 0x1234.into());
316316
test_ok(
317317
OpcodeId::SMOD,
@@ -324,7 +324,7 @@ mod test {
324324
Word::from_big_endian(&[255u8; 32]),
325325
);
326326
let mut x = [0u8; 32];
327-
x[31] = 128u8;
327+
x[0] = 128u8;
328328
test_ok(
329329
OpcodeId::SMOD,
330330
Word::from_big_endian(&x),

0 commit comments

Comments
 (0)