You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
379 B
23 lines
379 B
package validparens_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.jxs.me/leetgo/validparens"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestExamples(t *testing.T) {
|
|
cases := map[string]bool{
|
|
"": true,
|
|
"(": false,
|
|
"()": true,
|
|
"[{()}]": true,
|
|
"[(])": false,
|
|
}
|
|
|
|
for input, expected := range cases {
|
|
require.Equal(t, expected, validparens.IsValid(input))
|
|
}
|
|
}
|