Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
161c0613
Commit
161c0613
authored
Aug 30, 2016
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix cache/memcache test
parent
aa091cea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
memcache_test.go
cache/memcache/memcache_test.go
+6
-6
No files found.
cache/memcache/memcache_test.go
View file @
161c0613
...
...
@@ -46,7 +46,7 @@ func TestMemcacheCache(t *testing.T) {
t
.
Error
(
"set Error"
,
err
)
}
if
v
,
err
:=
strconv
.
Atoi
(
bm
.
Get
(
"astaxie"
)
.
(
string
));
err
!=
nil
||
v
!=
1
{
if
v
,
err
:=
strconv
.
Atoi
(
string
(
bm
.
Get
(
"astaxie"
)
.
([]
byte
)
));
err
!=
nil
||
v
!=
1
{
t
.
Error
(
"get err"
)
}
...
...
@@ -54,7 +54,7 @@ func TestMemcacheCache(t *testing.T) {
t
.
Error
(
"Incr Error"
,
err
)
}
if
v
,
err
:=
strconv
.
Atoi
(
bm
.
Get
(
"astaxie"
)
.
(
string
));
err
!=
nil
||
v
!=
2
{
if
v
,
err
:=
strconv
.
Atoi
(
string
(
bm
.
Get
(
"astaxie"
)
.
([]
byte
)
));
err
!=
nil
||
v
!=
2
{
t
.
Error
(
"get err"
)
}
...
...
@@ -62,7 +62,7 @@ func TestMemcacheCache(t *testing.T) {
t
.
Error
(
"Decr Error"
,
err
)
}
if
v
,
err
:=
strconv
.
Atoi
(
bm
.
Get
(
"astaxie"
)
.
(
string
));
err
!=
nil
||
v
!=
1
{
if
v
,
err
:=
strconv
.
Atoi
(
string
(
bm
.
Get
(
"astaxie"
)
.
([]
byte
)
));
err
!=
nil
||
v
!=
1
{
t
.
Error
(
"get err"
)
}
bm
.
Delete
(
"astaxie"
)
...
...
@@ -78,7 +78,7 @@ func TestMemcacheCache(t *testing.T) {
t
.
Error
(
"check err"
)
}
if
v
:=
bm
.
Get
(
"astaxie"
)
.
(
string
);
v
!=
"author"
{
if
v
:=
bm
.
Get
(
"astaxie"
)
.
(
[]
byte
);
string
(
v
)
!=
"author"
{
t
.
Error
(
"get err"
)
}
...
...
@@ -94,10 +94,10 @@ func TestMemcacheCache(t *testing.T) {
if
len
(
vv
)
!=
2
{
t
.
Error
(
"GetMulti ERROR"
)
}
if
vv
[
0
]
.
(
string
)
!=
"author"
&&
vv
[
0
]
.
(
string
)
!=
"author1"
{
if
string
(
vv
[
0
]
.
([]
byte
))
!=
"author"
&&
string
(
vv
[
0
]
.
([]
byte
)
)
!=
"author1"
{
t
.
Error
(
"GetMulti ERROR"
)
}
if
vv
[
1
]
.
(
string
)
!=
"author1"
&&
vv
[
1
]
.
(
string
)
!=
"author"
{
if
string
(
vv
[
1
]
.
([]
byte
))
!=
"author1"
&&
string
(
vv
[
1
]
.
([]
byte
)
)
!=
"author"
{
t
.
Error
(
"GetMulti ERROR"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment