fix strange merge issue
This commit is contained in:
parent
8268934635
commit
7536f525fa
@ -51,7 +51,6 @@ func New() *Config {
|
|||||||
|
|
||||||
// NewFrom will build a configuration from a byte slice. Because this is a
|
// NewFrom will build a configuration from a byte slice. Because this is a
|
||||||
// byte slice, the provided input doesn't matter, it's more about the length,
|
// byte slice, the provided input doesn't matter, it's more about the length,
|
||||||
func NewConfigFrom(in []byte) *Config {
|
|
||||||
func NewFrom(in []byte) *Config {
|
func NewFrom(in []byte) *Config {
|
||||||
c := New()
|
c := New()
|
||||||
c.size = len(in)
|
c.size = len(in)
|
||||||
|
@ -35,6 +35,8 @@ func Test_GenTinD_With_VaryingSizes(t *testing.T) {
|
|||||||
}
|
}
|
||||||
for _, v := range tests {
|
for _, v := range tests {
|
||||||
tt := New().WithRuneset(v.runes).WithSize(v.size).Gen()
|
tt := New().WithRuneset(v.runes).WithSize(v.size).Gen()
|
||||||
|
t.Logf("Generated string: %s", tt.String())
|
||||||
|
t.Logf("Generated bytes: %v", tt.Bytes())
|
||||||
if len(tt.Runes()) != v.size {
|
if len(tt.Runes()) != v.size {
|
||||||
t.Errorf("config set size to %d, but generated an id of size %d. id: %s", v.size, len([]rune(tt.String())), tt.String())
|
t.Errorf("config set size to %d, but generated an id of size %d. id: %s", v.size, len([]rune(tt.String())), tt.String())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user