Skip to content

Commit 23269be

Browse files
committed
Make sure all files are protected by build tags
1 parent ba99ec5 commit 23269be

2 files changed

Lines changed: 23 additions & 26 deletions

File tree

fsevents_test.go

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func TestBasicExample(t *testing.T) {
5656
if err != nil {
5757
t.Fatal(err)
5858
}
59-
select{
59+
select {
6060
case <-wait:
6161
case <-time.After(5 * time.Second):
6262
t.Fatal("timed out waiting for event")
@@ -149,3 +149,25 @@ func TestIssue48(t *testing.T) {
149149
t.Fatal("eventstream error was not detected on >4096 files in watchlist")
150150
}
151151
}
152+
153+
func TestRegistry(t *testing.T) {
154+
if registry.m == nil {
155+
t.Fatal("registry not initialized at start")
156+
}
157+
158+
es := &EventStream{}
159+
i := registry.Add(es)
160+
161+
if registry.Get(i) == nil {
162+
t.Fatal("failed to retrieve es from registry")
163+
}
164+
165+
if es != registry.Get(i) {
166+
t.Errorf("eventstream did not match what was found in the registry")
167+
}
168+
169+
registry.Delete(i)
170+
if registry.Get(i) != nil {
171+
t.Error("failed to delete registry")
172+
}
173+
}

registry_test.go

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)