Source file
src/runtime/synctest_test.go
1
2
3
4
5 package runtime_test
6
7 import (
8 "internal/synctest"
9 "runtime"
10 "testing"
11 )
12
13 func TestSynctest(t *testing.T) {
14 output := runTestProg(t, "testsynctest", "")
15 want := "success\n"
16 if output != want {
17 t.Fatalf("output:\n%s\n\nwanted:\n%s", output, want)
18 }
19 }
20
21
22
23 func TestSynctestAssocConsts(t *testing.T) {
24 if runtime.BubbleAssocUnbubbled != synctest.Unbubbled ||
25 runtime.BubbleAssocCurrentBubble != synctest.CurrentBubble ||
26 runtime.BubbleAssocOtherBubble != synctest.OtherBubble {
27 t.Fatal("mismatch: runtime.BubbleAssoc? != synctest.*")
28 }
29 }
30
View as plain text