@@ -8,19 +8,19 @@ import (
88)
99
1010func Test_trunc (t * testing.T ) {
11- t .Run ("31 " , func (t * testing.T ) {
12- x := trunc (strings .Repeat ("x" , 31 ))
13- assert .Len (t , x , 31 )
14- assert .Equal (t , "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx " , x )
11+ t .Run ("63 " , func (t * testing.T ) {
12+ x := trunc (strings .Repeat ("x" , 63 ))
13+ assert .Len (t , x , 63 )
14+ assert .Equal (t , "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx " , x )
1515 })
16- t .Run ("32 " , func (t * testing.T ) {
17- x := trunc (strings .Repeat ("x" , 32 ))
18- assert .Len (t , x , 32 )
19- assert .Equal (t , "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx " , x )
16+ t .Run ("64 " , func (t * testing.T ) {
17+ x := trunc (strings .Repeat ("x" , 64 ))
18+ assert .Len (t , x , 64 )
19+ assert .Equal (t , "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx " , x )
2020 })
21- t .Run ("33 " , func (t * testing.T ) {
22- x := trunc (strings .Repeat ("x" , 33 ))
23- assert .Len (t , x , 32 )
24- assert .Equal (t , "xxxxxxxxxxxxxxx ...xxxxxxxxxxxxxx " , x )
21+ t .Run ("65 " , func (t * testing.T ) {
22+ x := trunc (strings .Repeat ("x" , 65 ))
23+ assert .Len (t , x , 64 )
24+ assert .Equal (t , "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx " , x )
2525 })
2626}
0 commit comments