db525cba by astaxie

add session test & delete readme

1 parent d6dd84d5
1 ## beego 1 ## beego
2 =======
3 beego is a Go Framework which is inspired from tornado and sinatra. 2 beego is a Go Framework which is inspired from tornado and sinatra.
4 3
5 It is a simply & powerful web framework. 4 It is a simply & powerful web framework.
......
1 package session
2
3 import (
4 "testing"
5 )
6
7 func Test_gob(t *testing.T) {
8 a := make(map[interface{}]interface{})
9 a["username"] = "astaxie"
10 a[12] = 234
11 b, err := encodeGob(a)
12 if err != nil {
13 t.Error(err)
14 }
15 c, err := decodeGob(b)
16 if err != nil {
17 t.Error(err)
18 }
19 if len(c) == 0 {
20 t.Error("decodeGob empty")
21 }
22 if c["username"] != "astaxie" {
23 t.Error("decode string error")
24 }
25 if c[12] != 234 {
26 t.Error("decode int error")
27 }
28 }
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!