Created
April 25, 2018 02:15
-
-
Save xiaoyunyang/1a41134c5c4fe8109f2a5f1bd8ba7976 to your computer and use it in GitHub Desktop.
matchParenTestCases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let testCases = [ | |
{test: '(', shouldBe: false}, | |
{test: '())', shouldBe: false}, | |
{test: null, shouldBe: false}, | |
{test: undefined, shouldBe: false}, | |
{test: 22, shouldBe: false}, | |
{test: ')(', shouldBe: false}, | |
{test: '', shouldBe: true}, | |
{test: '()', shouldBe: true}, | |
{test: '()()', shouldBe: true}, | |
{test: '(())', shouldBe: true}, | |
{test: 'hi', shouldBe: true}, | |
{test: '(hi)', shouldBe: true}, | |
{test: '(((())(())',shouldBe: false} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment