mirror of
https://github.com/astaxie/beego.git
synced 2024-11-05 02:50:56 +00:00
25 lines
343 B
Go
25 lines
343 B
Go
|
package beego
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func Test_beemap(t *testing.T) {
|
||
|
bm := NewBeeMap()
|
||
|
if !bm.Set("astaxie", 1) {
|
||
|
t.Error("set Error")
|
||
|
}
|
||
|
if !bm.Check("astaxie") {
|
||
|
t.Error("check err")
|
||
|
}
|
||
|
|
||
|
if v := bm.Get("astaxie"); v.(int) != 1 {
|
||
|
t.Error("get err")
|
||
|
}
|
||
|
|
||
|
bm.Delete("astaxie")
|
||
|
if bm.Check("astaxie") {
|
||
|
t.Error("delete err")
|
||
|
}
|
||
|
}
|