|
|
|
@ -150,14 +150,15 @@ func TestNewMatch(t *testing.T) {
|
|
|
|
|
|
|
|
|
|
go func(match_c chan GraphSignal) {
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after starting 1")
|
|
|
|
|
(*graph_tester)(t).CheckForNone(match_c, "update to match after starting 2")
|
|
|
|
|
SendUpdate(match, NewSignal(nil, "queue_autonomous"))
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after starting 2")
|
|
|
|
|
(*graph_tester)(t).CheckForNone(match_c, "update to match after starting 3")
|
|
|
|
|
SendUpdate(arena, NewSignal(nil, "queue_autonomous"))
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after queueing autonomous 1")
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after queueing autonomous 2")
|
|
|
|
|
(*graph_tester)(t).CheckForNone(match_c, "update to match after queueing autonomous 3")
|
|
|
|
|
auton_signal := NewSignal(nil, "start_autonomous")
|
|
|
|
|
auton_signal.time = time.Now()
|
|
|
|
|
SendUpdate(match, auton_signal)
|
|
|
|
|
SendUpdate(arena, auton_signal)
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after starting autonomous 1")
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after starting autonomous 2")
|
|
|
|
|
(*graph_tester)(t).CheckForNone(match_c, "update to match after starting autonomous 3")
|
|
|
|
@ -165,13 +166,13 @@ func TestNewMatch(t *testing.T) {
|
|
|
|
|
time.Sleep(time.Millisecond * 100)
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after ending autonomous 1")
|
|
|
|
|
(*graph_tester)(t).CheckForNone(match_c, "update to match after ending autonomous 2")
|
|
|
|
|
SendUpdate(match, NewSignal(nil, "queue_driver"))
|
|
|
|
|
SendUpdate(arena, NewSignal(nil, "queue_driver"))
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after queueing driver 1")
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after queueing driver 2")
|
|
|
|
|
(*graph_tester)(t).CheckForNone(match_c, "update to match after queueing driver 3")
|
|
|
|
|
driver_signal := NewSignal(nil, "start_driver")
|
|
|
|
|
driver_signal.time = time.Now()
|
|
|
|
|
SendUpdate(match, driver_signal)
|
|
|
|
|
SendUpdate(arena, driver_signal)
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after starting driver 1")
|
|
|
|
|
(*graph_tester)(t).CheckForValue(match_c, "no update to match after starting driver 2")
|
|
|
|
|
(*graph_tester)(t).CheckForNone(match_c, "update to match after starting driver 3")
|
|
|
|
|