Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(925)

Side by Side Diff: testservices/identityservice/util_test.go

Issue 6844087: goose: all current code
Patch Set: Created 12 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 package identityservice
2
3 import (
4 . "launchpad.net/gocheck"
5 )
6
7 type UtilSuite struct{}
8
9 var _ = Suite(&UtilSuite{})
10
11 func (s *UtilSuite) TestRandomHexTokenHasLength(c *C) {
12 val := randomHexToken()
13 c.Assert(val, HasLen, 32)
14 }
15
16 func (s *UtilSuite) TestRandomHexTokenIsHex(c *C) {
17 val := randomHexToken()
18 for i, b := range val {
19 switch {
20 case (b >= 'a' && b <= 'f') || (b >= '0' && b <= '9'):
21 continue
22 default:
23 c.Logf("char %d of %s was not in the right range",
24 i, val)
25 c.Fail()
26 }
27 }
28 }
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b