mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-23 18:17:32 +00:00
16 lines
219 B
Go
16 lines
219 B
Go
package thread
|
|
|
|
import "testing"
|
|
|
|
func init() {
|
|
runtime.LockOSThread()
|
|
}
|
|
|
|
func TestMainThread(t *testing.T) {
|
|
value := 0
|
|
fn := func() { value = 1 }
|
|
Main(fn)
|
|
if value != 1 {
|
|
t.Errorf("wrong value %v", value)
|
|
}
|
|
}
|