Skip to content

Commit

Permalink
Merge pull request TechBowl-japan#33 from shake551/fix/error_check_sta12
Browse files Browse the repository at this point in the history
fix test error check at station12
  • Loading branch information
3c1u authored Feb 27, 2023
2 parents 83ab85e + 1f23331 commit 3f1f8b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _test/sta12/sta12_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package sta12_test

import (
"context"
"errors"
"os"
"reflect"
"testing"
"time"

Expand Down Expand Up @@ -66,7 +66,7 @@ func TestStation12(t *testing.T) {
},
"Subject is empty": {
ID: 1,
WantError: &sqlite3.Error{},
WantError: sqlite3.Error{},
},
"Description is empty": {
ID: 1,
Expand All @@ -92,7 +92,7 @@ func TestStation12(t *testing.T) {
return
}
case sqlite3.Error{}:
if !errors.As(err, &tc.WantError) {
if reflect.TypeOf(err) != reflect.TypeOf(tc.WantError) {
t.Errorf("期待していないエラーの Type です, got = %t, want = %+v", err, tc.WantError)
return
}
Expand All @@ -102,7 +102,7 @@ func TestStation12(t *testing.T) {
}
return
default:
if !errors.As(err, &tc.WantError) {
if reflect.TypeOf(err) != reflect.TypeOf(tc.WantError) {
t.Errorf("期待していないエラーの Type です, got = %t, want = %+v", err, tc.WantError)
return
}
Expand Down

0 comments on commit 3f1f8b9

Please sign in to comment.