github.com/gogf/gf/v2@v2.7.4/os/gsession/gsession_z_unit_test.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/gogf/gf. 6 7 package gsession 8 9 import ( 10 "testing" 11 12 "github.com/gogf/gf/v2/test/gtest" 13 ) 14 15 func Test_NewSessionId(t *testing.T) { 16 gtest.C(t, func(t *gtest.T) { 17 id1 := NewSessionId() 18 id2 := NewSessionId() 19 t.AssertNE(id1, id2) 20 t.Assert(len(id1), 32) 21 }) 22 }