util/util_test.go   A
last analyzed

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 7
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A util.TestRandString 0 3 2
1
////////////////////////////////////////////////////////////////////////////////
2
// Author:   Nikita Koryabkin
3
// Email:    [email protected]
4
// Telegram: https://t.me/Apologiz
5
////////////////////////////////////////////////////////////////////////////////
6
7
package util
8
9
import (
10
	"testing"
11
	"unicode/utf8"
12
)
13
14
func TestRandString(t *testing.T) {
15
	if got := RandString(10); utf8.RuneCountInString(got) != 10 {
16
		t.Errorf("RandString() = %v, want %v", utf8.RuneCountInString(got), 10)
17
	}
18
}
19