Skip to content

Commit e0dc8f5

Browse files
committed
Add algo for BooleanGateslogic and test cases
1 parent 5023e8a commit e0dc8f5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/java/com/thealgorithms/bitmanipulation/BooleanAlgebraGatesTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
package com.thealgorithms.bitmanipulation;
32

43
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -35,7 +34,10 @@ void testORGate(List<Boolean> inputs, boolean expected) {
3534
}
3635

3736
@ParameterizedTest(name = "NOTGate Test Case {index}: input={0} -> expected={1}")
38-
@CsvSource({"true, false", "false, true"})
37+
@CsvSource({
38+
"true, false",
39+
"false, true"
40+
})
3941
void testNOTGate(boolean input, boolean expected) {
4042
NOTGate gate = new NOTGate();
4143
assertEquals(expected, gate.evaluate(input));
@@ -108,4 +110,4 @@ static Stream<Object[]> provideNorGateTestCases() {
108110
new Object[]{Collections.emptyList(), true} // NOR over no inputs is true (negation of OR)
109111
);
110112
}
111-
}
113+
}

0 commit comments

Comments
 (0)