mirror of
https://github.com/safing/portmaster.git
synced 2026-12-05 10:03:06 +00:00
22 lines
327 B
Go
22 lines
327 B
Go
package main
|
|
|
|
func RunTest(name string, fn func() error) {
|
|
result := &checkResult{
|
|
name: name,
|
|
}
|
|
|
|
resultsLock.Lock()
|
|
results = append(results, result)
|
|
resultsLock.Unlock()
|
|
|
|
createTestRunNotification()
|
|
|
|
if err := fn(); err != nil {
|
|
result.err = err
|
|
} else {
|
|
result.passed = true
|
|
}
|
|
|
|
createTestRunNotification()
|
|
}
|