util.TestRandString   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
nop 1
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