about summary refs log blame commit diff stats
path: root/widgets/tabhost.go
blob: 7c502cb27e435a61f33e48230fe28aadbc561b25 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                    
package widgets

import (
	"time"
)

type TabHost interface {
	BeginExCommand()
	SetStatus(status string) *StatusMessage
	PushStatus(text string, expiry time.Duration) *StatusMessage
}
lass="cp">#include "ui/mock_ui.h" #include "command/commands.h" void cmd_win_shows_message_when_win_doesnt_exist(void **state) { mock_cons_show(); CommandHelp *help = malloc(sizeof(CommandHelp)); gchar *args[] = { "3", NULL }; ui_switch_win_expect_and_return(3, FALSE); expect_cons_show("Window 3 does not exist."); gboolean result = cmd_win(args, *help); assert_true(result); free(help); } void cmd_win_switches_to_given_win_when_exists(void **state) { CommandHelp *help = malloc(sizeof(CommandHelp)); gchar *args[] = { "12", NULL }; ui_switch_win_expect_and_return(12, TRUE); gboolean result = cmd_win(args, *help); assert_true(result); free(help); }