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

Commit

Permalink
test: add unit test case for func GetAsInt64
Browse files Browse the repository at this point in the history
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
  • Loading branch information
hs0210 committed Jan 17, 2020
1 parent b954004 commit 2865234
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 2865234

Please sign in to comment.