Skip to content

Commit 108fd50

Browse files
Merge pull request #2 from hemant224/1-add-test-cases
1 add test cases
2 parents 4da954d + 4ea9808 commit 108fd50

File tree

6 files changed

+22
-1
lines changed

6 files changed

+22
-1
lines changed

.idea/git_toolbox_prj.xml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/org/BitManipulation/Practice/AddBinaryStrings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Given two binary strings, return their sum (also a binary string).
44
*/
55
public class AddBinaryStrings {
6-
public String addBinary(String a, String b) {
6+
public static String addBinary(String a, String b) {
77
StringBuilder sb = new StringBuilder();
88
int i = a.length() - 1;
99
int j = b.length() - 1;

src/test/java/org/BitManipulation/Practice/AppTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.BitManipulation.Practice;
22

3+
import static org.junit.Assert.assertSame;
34
import static org.junit.Assert.assertTrue;
45

56
import org.junit.Test;
@@ -17,4 +18,9 @@ public void shouldAnswerWithTrue()
1718
{
1819
assertTrue( true );
1920
}
21+
22+
@Test
23+
public void test_1() {
24+
assertSame("100", AddBinaryStrings.addBinary("11", "1"));
25+
}
2026
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)