You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: logger_test.go
    path of file: ./repos/OpenDiablo2/d2common/d2util
    
    the code of the file until where you have to start completion: package d2util

import (
	"fmt"
	"testing"
)

type testWriter struct {
	data []byte
}


    
func Test_logger_SetLevel(t *testing.T) {
	l := NewLogger()
	l.Writer = &testWriter{}

	tests := []struct {
		level LogLevel
	}{
		{LogLevelNone},
		{LogLevelError},
		{LogLevelWarning},
		{LogLevelInfo},
		{LogLevelDebug},
	}

	for idx := range tests {
		targetLevel := tests[idx].level
		l.SetLevel(targetLevel)

		if l.level != targetLevel {
			t.Error("unexpected log level")
		}
	}
}