Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F10588174
random_test.go
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
351 B
Subscribers
None
random_test.go
View Options
package
id
import
"testing"
func
TestGenSafeUniqueSlug
(
t
*
testing
.
T
)
{
slug
:=
"slug"
r
:=
map
[
string
]
bool
{}
for
i
:=
0
;
i
<
1000
;
i
++
{
s
:=
GenSafeUniqueSlug
(
slug
)
if
s
==
slug
{
t
.
Errorf
(
"Got same slug as inputted!"
)
}
if
_
,
ok
:=
r
[
s
];
ok
{
t
.
Logf
(
"#%d: slug %s was already generated in testing."
,
i
,
s
)
}
r
[
s
]
=
true
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 25, 3:59 AM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3207645
Attached To
rWC Write.as Web Core
Event Timeline
Log In to Comment