Skip to content

Commit

Permalink
test: write test code ValidParentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
rldnrl committed Nov 8, 2022
1 parent 7d4c28a commit be98054
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/leetcode/ValidParenthesesTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package leetcode;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class ValidParenthesesTest {
@Test
void validParenthesesTest() {
String s1 = "()";
Assertions.assertTrue(ValidParentheses.isValid(s1));

String s2 = "()[]{}";
Assertions.assertTrue(ValidParentheses.isValid(s2));

String s3 = "(]";
Assertions.assertFalse(ValidParentheses.isValid(s3));

String s4 = "}}}}}";
Assertions.assertFalse(ValidParentheses.isValid(s4));

String s5 = "{[{]]]]";
Assertions.assertFalse(ValidParentheses.isValid(s5));
}
}

0 comments on commit be98054

Please sign in to comment.