MCPcopy Index your code
hub / github.com/dnote/dnote / TestSetLevel

Function TestSetLevel

pkg/server/log/log_test.go:22–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20)
21
22func TestSetLevel(t *testing.T) {
23 // Reset to default after test
24 defer SetLevel(LevelInfo)
25
26 SetLevel(LevelDebug)
27 if currentLevel != LevelDebug {
28 t.Errorf("Expected level %s, got %s", LevelDebug, currentLevel)
29 }
30
31 SetLevel(LevelError)
32 if currentLevel != LevelError {
33 t.Errorf("Expected level %s, got %s", LevelError, currentLevel)
34 }
35}
36
37func TestShouldLog(t *testing.T) {
38 // Reset to default after test

Callers

nothing calls this directly

Calls 1

SetLevelFunction · 0.85

Tested by

no test coverage detected