depth1_test.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package d1
  2. import (
  3. "testing"
  4. "gitp78su.ipnodns.ru/svi/kern/v4/d0"
  5. )
  6. type tester struct {
  7. t *testing.T
  8. }
  9. func TestDepth1(t *testing.T) {
  10. sf := &tester{
  11. t: t,
  12. }
  13. sf.makeEnv()
  14. // sf.newLogBuf()
  15. // sf.newSafeString()
  16. // sf.newSafeIntFromStr()
  17. // sf.newSafeIntGetenv()
  18. }
  19. // func (sf *tester) newSafeIntGetenv() {
  20. // sf.t.Log("newSafeIntGetenv")
  21. // safeInt := MutSafeIntGetenv(d0.LetTxt("test_env"))
  22. // if safeInt == nil {
  23. // sf.t.Fatalf("newSafeIntGetenv(): safeInt==nil")
  24. // }
  25. // }
  26. // func (sf *tester) newSafeIntFromStr() {
  27. // sf.t.Log("newSafeIntFromStr")
  28. // safeInt := MutSafeIntFromStr(d0.LetTxt("123"))
  29. // if safeInt == nil {
  30. // sf.t.Fatalf("newSafeIntFromStr(): safeInt==nil")
  31. // }
  32. // }
  33. // func (sf *tester) newSafeString() {
  34. // sf.t.Log("newSafeString")
  35. // safeString := MutSafeTxt("test string")
  36. // if safeString == nil {
  37. // sf.t.Fatalf("newSafeString(): safeString==nil")
  38. // }
  39. // }
  40. // func (sf *tester) newLogBuf() {
  41. // sf.t.Log("newLogBuf")
  42. // param := &LogBufParam{
  43. // IsTerm_: safe_bool.MutSafeBool(true),
  44. // }
  45. // logBuf := NewLogBuf(param)
  46. // if logBuf == nil {
  47. // sf.t.Fatalf("newLogBuf(): logBuf==nil")
  48. // }
  49. // }
  50. func (sf *tester) makeEnv() {
  51. sf.t.Log("makeEnv")
  52. owner := d0.LetOwner(1, "test_mock_env")
  53. env := MakeEnv(owner)
  54. if env == nil {
  55. sf.t.Fatalf("makeEnv(): env==nil")
  56. }
  57. }