@@ 17,8 17,6 @@ package tcell
import (
"testing"
"time"
-
- . "github.com/smartystreets/goconvey/convey"
)
func eventLoop(s Screen, evch chan Event) {
@@ 37,13 35,7 @@ func eventLoop(s Screen, evch chan Event
func TestMouseEvents(t *testing.T) {
- Convey("Mouse events", t, WithScreen(t, "", func(s SimulationScreen) {
-
- Convey("Size should be valid", func() {
- x, y := s.Size()
- So(x, ShouldEqual, 80)
- So(y, ShouldEqual, 25)
- })
+ WithScreen(t, "", func(s SimulationScreen) {
s.EnableMouse()
s.InjectMouse(4, 9, Button1, ModCtrl)
@@ 64,14 56,11 @@ func TestMouseEvents(t *testing.T) {
done = true
}
}
- Convey("We got our mouse event", func() {
- So(em, ShouldNotBeNil)
- x, y := em.Position()
- So(x, ShouldEqual, 4)
- So(y, ShouldEqual, 9)
- So(em.Buttons(), ShouldEqual, Button1)
- So(em.Modifiers(), ShouldEqual, ModCtrl)
- })
- }))
-
+ assertNotEqual("mouse event", em, nil, t)
+ x, y := em.Position()
+ assertEqual("x", x, 4, t)
+ assertEqual("y", y, 9, t)
+ assertEqual("buttons", em.Buttons(), Button1, t)
+ assertEqual("mods", em.Modifiers(), ModCtrl, t)
+ })()
}