github.com/gogf/gf/v2@v2.7.4/os/gbuild/gbuild_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 gbuild_test 8 9 import ( 10 "testing" 11 12 "github.com/gogf/gf/v2/frame/g" 13 "github.com/gogf/gf/v2/os/gbuild" 14 "github.com/gogf/gf/v2/test/gtest" 15 "github.com/gogf/gf/v2/util/gconv" 16 ) 17 18 func Test_Info(t *testing.T) { 19 gtest.C(t, func(t *gtest.T) { 20 t.Assert(gconv.Map(gbuild.Info()), g.Map{ 21 "GoFrame": "", 22 "Golang": "", 23 "Git": "", 24 "Time": "", 25 "Version": "", 26 "Data": g.Map{}, 27 }) 28 }) 29 } 30 31 func Test_Get(t *testing.T) { 32 gtest.C(t, func(t *gtest.T) { 33 t.Assert(gbuild.Get(`none`), nil) 34 }) 35 gtest.C(t, func(t *gtest.T) { 36 t.Assert(gbuild.Get(`none`, 1), 1) 37 }) 38 } 39 40 func Test_Map(t *testing.T) { 41 gtest.C(t, func(t *gtest.T) { 42 t.Assert(gbuild.Data(), map[string]interface{}{}) 43 }) 44 }