1package main 2 3import "testing" 4 5func TestNotRunMain(t *testing.T) { 6 if mainDidRun { 7 t.Error("main function did run") 8 } 9} 10