| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- // package lev1 -- объединяющий пакет уровня
- package lev1
- import (
- "testing"
- "gitp78su.ipnodns.ru/svi/kern/v4/lev1/safe_bool"
- )
- type tester struct {
- t *testing.T
- }
- func TestLev1(t *testing.T) {
- sf := &tester{
- t: t,
- }
- sf.makeEnv()
- sf.newLogBuf()
- sf.newSafeString()
- sf.newSafeIntFromStr()
- sf.newSafeIntGetenv()
- }
- func (sf *tester) newSafeIntGetenv() {
- sf.t.Log("newSafeIntGetenv")
- safeInt := NewSafeIntGetenv("test_env")
- if safeInt == nil {
- sf.t.Fatalf("newSafeIntGetenv(): safeInt==nil")
- }
- }
- func (sf *tester) newSafeIntFromStr() {
- sf.t.Log("newSafeIntFromStr")
- safeInt := NewSafeIntFromStr("123")
- if safeInt == nil {
- sf.t.Fatalf("newSafeIntFromStr(): safeInt==nil")
- }
- }
- func (sf *tester) newSafeString() {
- sf.t.Log("newSafeString")
- safeString := NewSafeString()
- if safeString == nil {
- sf.t.Fatalf("newSafeString(): safeString==nil")
- }
- }
- func (sf *tester) newLogBuf() {
- sf.t.Log("newLogBuf")
- param := &LogBufParam{
- IsTerm_: safe_bool.NewSafeBool(true),
- }
- logBuf := NewLogBuf(param)
- if logBuf == nil {
- sf.t.Fatalf("newLogBuf(): logBuf==nil")
- }
- }
- func (sf *tester) makeEnv() {
- sf.t.Log("makeEnv")
- env := MakeEnv()
- if env == nil {
- sf.t.Fatalf("makeEnv(): env==nil")
- }
- }
|