Skip to content

Commit

Permalink
remove prints
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-skrenkovic committed May 3, 2024
1 parent 482c2fe commit 91b455f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ func (w *eventCollector) addWatch(t *testing.T, path ...string) {

p := join(path...)

fmt.Printf("path: %s\n", p)

dev, err := DeviceForPath(p)
if err != nil {
t.Fatal(err)
Expand All @@ -50,8 +48,6 @@ func (w *eventCollector) addWatch(t *testing.T, path ...string) {

go func() {
for msg := range es.Events {
fmt.Printf("events: %+v\n", msg)

w.mu.Lock()
w.e = append(w.e, msg...)
w.mu.Unlock()
Expand All @@ -60,15 +56,15 @@ func (w *eventCollector) addWatch(t *testing.T, path ...string) {
}

// rmWatch removes a watch.
func (c *eventCollector) rmWatch(t *testing.T, path ...string) {
func (w *eventCollector) rmWatch(t *testing.T, path ...string) {
t.Helper()
if len(path) < 1 {
t.Fatalf("rmWatch: path must have at least one element: %s", path)
}

//p := join(path...)
//c.streams[p].Stop()
//delete(c.streams, p)
p := join(path...)
w.streams[p].Stop()
delete(w.streams, p)
}

const noWait = ""

Check failure on line 70 in helpers_test.go

View workflow job for this annotation

GitHub Actions / staticcheck

const noWait is unused (U1000)
Expand Down Expand Up @@ -723,7 +719,6 @@ func parseScript(t *testing.T, in string) {
loop:
for _, c := range cmds {
c := c
//fmt.Printf("line %d: %q %q\n", c.line, c.cmd, c.args)
switch c.cmd {
case "skip", "require":
mustArg(c, 1)
Expand Down

0 comments on commit 91b455f

Please sign in to comment.