Commit 3a2ae568 authored by Mike Jones's avatar Mike Jones 馃尪
Browse files

Cleanup

parent 92fe96e1
......@@ -16,9 +16,7 @@ func TestNewPoint(t *testing.T) {
sp := NewApplication()
t.Run("Invalid user input", func(t *testing.T) {
p := sp.NewPoint("hello, world")
if p != nil {
if sp.NewPoint("hello, world") != nil {
t.Fail()
}
})
......@@ -40,33 +38,31 @@ func TestNewPoint(t *testing.T) {
})
t.Run("Bad stat, multiple input", func(t *testing.T) {
p := sp.NewPoint("ohno+5")
if p != nil {
if sp.NewPoint("ohno+5") != nil {
t.Fail()
}
})
t.Run("Nil value", func(t *testing.T) {
p := sp.NewPoint("pizza+0") // smartarse
if p != nil {
if sp.NewPoint("pizza+0") != nil { // smartarse
t.Fail()
}
})
t.Run("Stuck together permitted stats", func(t *testing.T) {
p := sp.NewPoint("beerpizza++")
if p != nil {
if sp.NewPoint("beerpizza++") != nil {
t.Fail()
}
})
t.Run("The command should take up the entire message", func(t *testing.T) {
p := sp.NewPoint("Bad pizza++ more very bad")
if sp.NewPoint("Bad pizza++ more very bad") != nil {
t.Fail()
}
})
if p != nil {
t.Run("Incomplete input", func(t *testing.T) {
if sp.NewPoint("pizza+") != nil {
t.Fail()
}
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment