| 1 | //go:build darwin && !cgo |
| 2 | |
| 3 | package main |
| 4 | |
| 5 | import ( |
| 6 | "errors" |
| 7 | "testing" |
| 8 | ) |
| 9 | |
| 10 | func TestDarwinWorkspaceWatcherWithoutCGOIsUnavailable(t *testing.T) { |
| 11 | w, err := newWorkspaceWatcher() |
| 12 | if w != nil || !errors.Is(err, errDarwinWorkspaceWatchingRequiresCGO) { |
| 13 | t.Fatalf("newWorkspaceWatcher() = (%T, %v), want nil and CGO requirement", w, err) |
| 14 | } |
| 15 | } |
| 16 |