mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-08 18:32:56 +08:00
Add another method to check valid parentheses in ValidParentheses.java (#5616)
This commit is contained in:

committed by
GitHub

parent
732f7c8458
commit
4a5bf39f8e
@ -10,15 +10,18 @@ public class ValidParenthesesTest {
|
||||
@Test
|
||||
void testOne() {
|
||||
assertTrue(ValidParentheses.isValid("()"));
|
||||
assertTrue(ValidParentheses.isValidParentheses("()"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testTwo() {
|
||||
assertTrue(ValidParentheses.isValid("()[]{}"));
|
||||
assertTrue(ValidParentheses.isValidParentheses("()[]{}"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testThree() {
|
||||
assertFalse(ValidParentheses.isValid("(]"));
|
||||
assertFalse(ValidParentheses.isValidParentheses("(]"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user