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 GetAsString
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 10, 2020
1 parent 9769c2c commit 34cf285
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/syncmap/syncmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ func (suite *SyncMapUtilSuite) TestGetAsInt(c *check.C) {
result, _ := mmap.GetAsInt("aaa")
c.Check(result, check.DeepEquals, 111)
}

func (suite *SyncMapUtilSuite) TestGetAsString(c *check.C) {
mmap := NewSyncMap()
mmap.Add("aaa", "value")

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

0 comments on commit 34cf285

Please sign in to comment.