Skip to content

Commit

Permalink
Merge branch 'main' into alu-ext
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Trintinalia committed Apr 21, 2023
2 parents 65e2d1c + 85a0c36 commit d0ef217
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ class AdderTest {
@Test
void zeroAddZero_isZero() {
BaseBytes actual = Adder.addSub(OpCode.ADD, Bytes32.ZERO, Bytes32.ZERO);
assertThat(actual).isEqualTo(Bytes32.ZERO);
assertThat(actual.getBytes32()).isEqualTo(Bytes32.ZERO);
}

@Test
void zeroSubZero_isZero() {
BaseBytes actual = Adder.addSub(OpCode.SUB, Bytes32.ZERO, Bytes32.ZERO);
assertThat(actual).isEqualTo(Bytes32.ZERO);
assertThat(actual.getBytes32()).isEqualTo(Bytes32.ZERO);
}

@Test
void xSubZero_isX() {
Bytes32 randomBytes = Bytes32.random();
BaseBytes actual = Adder.addSub(OpCode.SUB, randomBytes, Bytes32.ZERO);
assertThat(actual).isEqualTo(randomBytes);
assertThat(actual.getBytes32()).isEqualTo(randomBytes);
}

@Test
void xAddZero_isX() {
Bytes32 randomBytes = Bytes32.random();
BaseBytes actual = Adder.addSub(OpCode.ADD, randomBytes, Bytes32.ZERO);
assertThat(actual).isEqualTo(randomBytes);
assertThat(actual.getBytes32()).isEqualTo(randomBytes);
}

@Test
Expand All @@ -55,7 +55,7 @@ void maxSubMax_isZero() {
b = 'f';
Bytes32 max = Bytes32.repeat(b);
BaseBytes actual = Adder.addSub(OpCode.SUB, max, max);
assertThat(actual).isEqualTo(Bytes32.ZERO);
assertThat(actual.getBytes32()).isEqualTo(Bytes32.ZERO);
}

@Test
Expand All @@ -64,7 +64,7 @@ void maxSubZero_isMax() {
b = 'f';
Bytes32 max = Bytes32.repeat(b);
BaseBytes actual = Adder.addSub(OpCode.SUB, max, Bytes32.ZERO);
assertThat(actual).isEqualTo(max);
assertThat(actual.getBytes32()).isEqualTo(max);
}

@Test
Expand Down

0 comments on commit d0ef217

Please sign in to comment.