// TestDrawError checks that an error message can be drawn to the screen.
TestDrawError checks that an error message can be drawn to the screen.
// TestDrawError checks that an error message can be drawn to the screen .
func TestDrawError(t *testing.T) {
	s := NewMockScreen(12, 11)
	Error(s, errors.New("test"))
	statusLine := make([]rune, 0, 12)
	for _, p := range s.pixels[5] {
		statusLine = append(statusLine, p.mainc)
	}
	if actual, expected := string(statusLine), "cannot draw:"; actual != expected {
		t.Errorf(`Status line = %q, want %q`, actual, expected)
	}
	errorLine := make([]rune, 0, 12)
	for _, p := range s.pixels[6] {
		errorLine = append(errorLine, p.mainc)
	}
	if actual, expected := string(errorLine), "    test    "; actual != expected {
		t.Errorf(`Error line = %q, want %q`, actual, expected)
	}
}
func TestDrawError ( t * testing . T ) { s := NewMockScreen ( 12 , 11 ) Error ( s , errors . New ( " " ) ) statusLine := make ( [ ] rune , 0 , 12 ) for _ , p := range s . pixels [ 5 ] { statusLine = append ( statusLine , p . mainc ) } if actual , expected := string ( statusLine ) , " " ; actual != expected { t . Errorf ( `Status line = %q, want %q` , actual , expected ) } errorLine := make ( [ ] rune , 0 , 12 ) for _ , p := range s . pixels [ 6 ] { errorLine = append ( errorLine , p . mainc ) } if actual , expected := string ( errorLine ) , " " ; actual != expected { t . Errorf ( `Error line = %q, want %q` , actual , expected ) } }
TestDrawError checks that an error message can be drawn to the screen.
TestDrawError checks that an error message can be drawn to the screen .
// TODO line 5 "cannot draw:" // TODO line 6 error message