blob: dadfd8136a382067cd6ed4a3fe8a8067291176f9 [file] [log] [blame]
package examples
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestIntegerManipulation(t *testing.T) {
t.Parallel()
Convey("Given a starting integer value", t, func() {
x := 42
Convey("When incremented", func() {
x++
Convey("The value should be greater by one", func() {
So(x, ShouldEqual, 43)
})
Convey("The value should NOT be what it used to be", func() {
So(x, ShouldNotEqual, 42)
})
})
Convey("When decremented", func() {
x--
Convey("The value should be lesser by one", func() {
So(x, ShouldEqual, 41)
})
Convey("The value should NOT be what it used to be", func() {
So(x, ShouldNotEqual, 42)
})
})
})
}