github.com/flatt-online-training/libcompose@v0.4.0/project/events/events_test.go (about) 1 package events 2 3 import ( 4 "fmt" 5 "testing" 6 ) 7 8 func TestEventEquality(t *testing.T) { 9 if fmt.Sprintf("%s", ServiceStart) != "Started" || 10 fmt.Sprintf("%v", ServiceStart) != "Started" { 11 t.Fatalf("EventServiceStart String() doesn't work: %s %v", ServiceStart, ServiceStart) 12 } 13 14 if fmt.Sprintf("%s", ServiceStart) != fmt.Sprintf("%s", ServiceUp) { 15 t.Fatal("Event messages do not match") 16 } 17 18 if ServiceStart == ServiceUp { 19 t.Fatal("Events match") 20 } 21 }