Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TouHou.FM
Radio Go
Playlist
Commits
f333f5ad
Commit
f333f5ad
authored
Aug 27, 2020
by
Daniel Sonck
Browse files
Improve tests
parent
578f04f8
Changes
4
Hide whitespace changes
Inline
Side-by-side
internal/deck/status.go
View file @
f333f5ad
...
...
@@ -10,10 +10,8 @@ func (p Status) String() string {
switch
p
{
case
Stopped
:
return
"stopped"
case
Playing
:
return
"playing"
default
:
return
"
invalid
"
return
"
playing
"
}
}
...
...
internal/deck/status_test.go
View file @
f333f5ad
package
deck
import
"testing"
func
TestStatus_String
(
t
*
testing
.
T
)
{
var
v
Status
=
Playing
if
ans
:=
v
.
String
();
ans
!=
"playing"
{
t
.
Fatalf
(
"Playing.String() failed. expected %v, got %v"
,
"playing"
,
ans
)
}
v
=
Stopped
if
ans
:=
v
.
String
();
ans
!=
"stopped"
{
t
.
Fatalf
(
"Playing.String() failed. expected %v, got %v"
,
"stopped"
,
ans
)
}
}
\ No newline at end of file
internal/version_test.go
deleted
100644 → 0
View file @
578f04f8
package
internal
main_test.go
View file @
f333f5ad
package
main
import
(
"os"
"testing"
)
func
Test_main
(
t
*
testing
.
T
)
{
// Just call main help start which should work
os
.
Args
=
[]
string
{
"playlist"
,
"help"
,
"start"
}
main
()
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment