Skip to content

Commit

Permalink
unbreak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KenjiTakahashi committed May 24, 2023
1 parent 463a6d8 commit 1fb67d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: [1.18, 1.19, 1.20]
go: ["1.18", "1.19", "1.20"]

steps:
- name: setup Go
Expand Down
23 changes: 0 additions & 23 deletions battery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,6 @@ import (
"testing"
)

func TestNewState(t *testing.T) {
cases := []struct {
in string
stateOut State
errorOut error
}{
{"Charging", Charging, nil},
{"charging", Charging, nil},
{"strange", Unknown, fmt.Errorf("Invalid state `strange`")},
}

for i, c := range cases {
state, err := newState(c.in)

if state != c.stateOut {
t.Errorf("%d: %v != %v", i, state, c.stateOut)
}
if !reflect.DeepEqual(err, c.errorOut) {
t.Errorf("%d: %v != %v", i, err, c.errorOut)
}
}
}

func TestGet(t *testing.T) {
cases := []struct {
batteryIn *Battery
Expand Down

0 comments on commit 1fb67d4

Please sign in to comment.