Skip to content

Commit

Permalink
implement conv test
Browse files Browse the repository at this point in the history
Signed-off-by: kevindiu <kevindiujp@gmail.com>
  • Loading branch information
kevindiu committed Jun 1, 2022
1 parent e8b592d commit 7c443f6
Showing 1 changed file with 18 additions and 50 deletions.
68 changes: 18 additions & 50 deletions internal/conv/conv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,31 +263,15 @@ func TestUtf8ToSjis(t *testing.T) {
return nil
}
tests := []test{
// TODO test cases
/*
{
name: "test_case_1",
args: args {
s: "",
},
want: want{},
checkFunc: defaultCheckFunc,
},
*/

// TODO test cases
/*
func() test {
return test {
name: "test_case_2",
args: args {
s: "",
},
want: want{},
checkFunc: defaultCheckFunc,
}
}(),
*/
{
name: "return sjis string from UTF8 string",
args: args{
s: "こんにちは",
},
want: want{
want: "\x82\xb1\x82\xf1\x82ɂ\xbf\x82\xcd",
},
},
}

for _, tc := range tests {
Expand Down Expand Up @@ -341,31 +325,15 @@ func TestUtf8ToEucjp(t *testing.T) {
return nil
}
tests := []test{
// TODO test cases
/*
{
name: "test_case_1",
args: args {
s: "",
},
want: want{},
checkFunc: defaultCheckFunc,
},
*/

// TODO test cases
/*
func() test {
return test {
name: "test_case_2",
args: args {
s: "",
},
want: want{},
checkFunc: defaultCheckFunc,
}
}(),
*/
{
name: "return eucjp string from UTF8 string",
args: args{
s: "こんにちは",
},
want: want{
want: "\xa4\xb3\xa4\xf3\xa4ˤ\xc1\xa4\xcf",
},
},
}

for _, tc := range tests {
Expand Down

0 comments on commit 7c443f6

Please sign in to comment.