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
430 B
25 lines
430 B
2 years ago
|
package countandsay_test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"git.jxs.me/leetgo/countandsay"
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestBase(t *testing.T) {
|
||
|
require.Equal(t, "1", countandsay.Nth(1))
|
||
|
}
|
||
|
|
||
|
func TestTwo(t *testing.T) {
|
||
|
require.Equal(t, "11", countandsay.Nth(2))
|
||
|
}
|
||
|
|
||
|
func TestThree(t *testing.T) {
|
||
|
require.Equal(t, "21", countandsay.Nth(3))
|
||
|
}
|
||
|
|
||
|
func TestFour(t *testing.T) {
|
||
|
require.Equal(t, "1211", countandsay.Nth(4))
|
||
|
}
|