Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1189 from hs0210/work
Browse files Browse the repository at this point in the history
test: add unit test case for func GetAsInt64
  • Loading branch information
lowzj authored Jan 20, 2020
2 parents b954004 + 2865234 commit 919ff03
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/syncmap/syncmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,12 @@ func (suite *SyncMapUtilSuite) TestGetAsBitset(c *check.C) {
result, _ := mmap.GetAsBitset("aaa")
c.Check(result, check.DeepEquals, expected)
}

func (suite *SyncMapUtilSuite) TestGetAsInt64(c *check.C) {
expected := int64(111)
mmap := NewSyncMap()
mmap.Add("aaa", expected)

result, _ := mmap.GetAsInt64("aaa")
c.Check(result, check.DeepEquals, expected)
}

0 comments on commit 919ff03

Please sign in to comment.