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.
25 lines
435 B
25 lines
435 B
2 years ago
|
package breakpalindrome_test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
bp "git.jxs.me/leetgo/breakpalindrome"
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestEmpty(t *testing.T) {
|
||
|
require.Equal(t, "", bp.Break(""))
|
||
|
}
|
||
|
|
||
|
func TestSingle(t *testing.T) {
|
||
|
require.Equal(t, "", bp.Break("a"))
|
||
|
}
|
||
|
|
||
|
func TestShort(t *testing.T) {
|
||
|
require.Equal(t, "aaccba", bp.Break("abccba"))
|
||
|
}
|
||
|
|
||
|
func TestAllA(t *testing.T) {
|
||
|
require.Equal(t, "aaaab", bp.Break("aaaaa"))
|
||
|
}
|