Debian Codegraph @

internal/efw/proc_test.go

raw symbols SCIP
1 //go:build windows
2
3 package efw
4
5 import (
6 "testing"
7
8 "github.com/go-quicktest/qt"
9 )
10
11 func TestNewProc(t *testing.T) {
12 _, err := newProc("a_function_which_doesnt_exist").Find()
13 qt.Assert(t, qt.ErrorMatches(err, ".* a_function_which_doesnt_exist .*"))
14 }
15
16 func TestCall(t *testing.T) {
17 var err error
18 allocs := testing.AllocsPerRun(10, func() {
19 _, err = EbpfGetEbpfAttachType(2)
20 })
21 qt.Assert(t, qt.IsNil(err))
22 qt.Assert(t, qt.Equals(allocs, 0))
23 }