remove convey from runes_test.go
4 files changed, 37 insertions(+), 39 deletions(-)

M runes_test.go
M screen.go
M sim_test.go
M view/textarea.go
M runes_test.go +33 -35
@@ 16,51 16,49 @@ package tcell
 
 import (
 	"testing"
-
-	. "github.com/smartystreets/goconvey/convey"
 )
 
 func TestCanDisplay(t *testing.T) {
-	Convey("With a UTF-8 screen", t,
-		WithScreen(t, "UTF-8", func(s SimulationScreen) {
-			So(s.CharacterSet(), ShouldEqual, "UTF-8")
-			So(s.CanDisplay('a', true), ShouldBeTrue)
-			So(s.CanDisplay(RuneHLine, true), ShouldBeTrue)
-			So(s.CanDisplay(RuneHLine, false), ShouldBeTrue)
-			So(s.CanDisplay('⌀', false), ShouldBeTrue)
-		}))
 
-	Convey("With an ASCII screen", t,
-		WithScreen(t, "US-ASCII", func(s SimulationScreen) {
-			So(s.CharacterSet(), ShouldEqual, "US-ASCII")
-			So(s.CanDisplay('a', true), ShouldBeTrue)
-			So(s.CanDisplay(RuneHLine, true), ShouldBeTrue)
-			So(s.CanDisplay(RunePi, false), ShouldBeFalse)
-			So(s.CanDisplay('⌀', false), ShouldBeFalse)
-		}))
+	WithScreen(t, "UTF-8", func(s SimulationScreen) {
+		assertEqual("utf8 1", s.CharacterSet(), "UTF-8", t)
+		assertEqual("utf8 2", s.CanDisplay('a', true), true, t)
+		assertEqual("utf8 3", s.CanDisplay(RuneHLine, true), true, t)
+		assertEqual("utf8 4", s.CanDisplay(RuneHLine, false), true, t)
+		assertEqual("utf8 5", s.CanDisplay('⌀', false), true, t)
+	})()
+
+	WithScreen(t, "US-ASCII", func(s SimulationScreen) {
+		assertEqual("ascii 1", s.CharacterSet(), "US-ASCII", t)
+		assertEqual("ascii 2", s.CanDisplay('a', true), true, t)
+		assertEqual("ascii 3", s.CanDisplay(RuneHLine, true), true, t)
+		assertEqual("ascii 4", s.CanDisplay(RunePi, false), false, t)
+		assertEqual("ascii 5", s.CanDisplay('⌀', false), false, t)
+	})()
 
 }
 
 func TestRegisterFallback(t *testing.T) {
-	Convey("With an ASCII screen", t,
-		WithScreen(t, "US-ASCII", func(s SimulationScreen) {
-			So(s.CharacterSet(), ShouldEqual, "US-ASCII")
-			s.RegisterRuneFallback('⌀', "o")
-			So(s.CanDisplay('⌀', false), ShouldBeFalse)
-			So(s.CanDisplay('⌀', true), ShouldBeTrue)
-			s.UnregisterRuneFallback('⌀')
-			So(s.CanDisplay('⌀', false), ShouldBeFalse)
-			So(s.CanDisplay('⌀', true), ShouldBeFalse)
-		}))
+
+	WithScreen(t, "US-ASCII", func(s SimulationScreen) {
+		assertEqual("ascii 1", s.CharacterSet(), "US-ASCII", t)
+		s.RegisterRuneFallback('⌀', "o")
+		assertEqual("registered false", s.CanDisplay('⌀', false), false, t)
+		assertEqual("registered true", s.CanDisplay('⌀', true), true, t)
+		s.UnregisterRuneFallback('⌀')
+		assertEqual("unregistered false", s.CanDisplay('⌀', false), false, t)
+		assertEqual("unregistered true", s.CanDisplay('⌀', true), false, t)
+	})()
 
 }
 
 func TestUnregisterFallback(t *testing.T) {
-	Convey("With an ASCII screen (HLine)", t,
-		WithScreen(t, "US-ASCII", func(s SimulationScreen) {
-			So(s.CharacterSet(), ShouldEqual, "US-ASCII")
-			So(s.CanDisplay(RuneHLine, true), ShouldBeTrue)
-			s.UnregisterRuneFallback(RuneHLine)
-			So(s.CanDisplay(RuneHLine, true), ShouldBeFalse)
-		}))
+
+	WithScreen(t, "US-ASCII", func(s SimulationScreen) {
+		assertEqual("ascii 1", s.CharacterSet(), "US-ASCII", t)
+
+		assertEqual("registered", s.CanDisplay(RuneHLine, true), true, t)
+		s.UnregisterRuneFallback(RuneHLine)
+		assertEqual("unregistered", s.CanDisplay(RuneHLine, true), false, t)
+	})()
 }

          
M screen.go +1 -1
@@ 179,7 179,7 @@ type Screen interface {
 	// as supported but not actually be usable (such as some emulators
 	// that hijack certain keys).  Its best not to depend to strictly
 	// on this function, but it can be used for hinting when building
-	// menus, displayed hot-keys, etc.  Note that KeyRune (literal
+	// menus, displayed hot-keys, etc. Note that HasKey(KeyRune) (literal
 	// runes) is always true.
 	HasKey(Key) bool
 }

          
M sim_test.go +2 -2
@@ 122,8 122,8 @@ func TestClearScreen(t *testing.T) {
 }
 
 func TestSetCell(t *testing.T) {
-	st := StyleDefault.Background(ColorRed).Blink(true)
 	WithScreen(t, "", func(s SimulationScreen) {
+		st := StyleDefault.Background(ColorRed).Blink(true)
 		s.SetContent(2, 5, '@', nil, st)
 		b, x, y := s.GetContents()
 		assertEqual("x", x, 80, t)

          
@@ 142,8 142,8 @@ func TestSetCell(t *testing.T) {
 }
 
 func TestResize(t *testing.T) {
-	st := StyleDefault.Background(ColorYellow).Underline(true)
 	WithScreen(t, "", func(s SimulationScreen) {
+		st := StyleDefault.Background(ColorYellow).Underline(true)
 		s.SetContent(2, 5, '&', nil, st)
 		b, _, _ := s.GetContents()
 		s.Show()

          
M view/textarea.go +1 -1
@@ 90,7 90,7 @@ func (ta *TextArea) SetLines(lines []str
 	m := ta.model
 	m.width = 0
 	m.height = len(lines)
-	m.lines = append([]string{}, lines...)
+	m.lines = append(lines[:0], lines...)
 	for _, l := range lines {
 		if len(l) > m.width {
 			m.width = len(l)