lkcp9_test.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright © 2015 Daniel Fu <daniel820313@gmail.com>.
  2. // Copyright © 2019 Loki 'l0k18' Verloren <stalker.loki@protonmail.ch>.
  3. // Copyright © 2020 Gridfinity, LLC. <admin@gridfinity.com>.
  4. // Copyright © 2020 Jeffrey H. Johnson <jeff@gridfinity.com>.
  5. //
  6. // All rights reserved.
  7. //
  8. // All use of this code is governed by the MIT license.
  9. // The complete license is available in the LICENSE file.
  10. package lkcp9_test
  11. import (
  12. "fmt"
  13. "runtime"
  14. "runtime/debug"
  15. "testing"
  16. u "go.gridfinity.dev/leaktestfe"
  17. licn "go4.org/legal"
  18. )
  19. func TestGoEnvironment(
  20. t *testing.T,
  21. ) {
  22. defer u.Leakplug(
  23. t,
  24. )
  25. debug.FreeOSMemory()
  26. t.Log(
  27. fmt.Sprintf(
  28. "\nGo ROOT=%v\nGo Version=%v\nGo GOMAXPROCS=%v\nGo NumCPU=%v",
  29. runtime.GOROOT(),
  30. runtime.Version(),
  31. runtime.GOMAXPROCS(-1),
  32. runtime.NumCPU(),
  33. ),
  34. )
  35. }
  36. func Testlkcp9License(
  37. t *testing.T,
  38. ) {
  39. defer u.Leakplug(
  40. t,
  41. )
  42. licenses := licn.Licenses()
  43. if len(
  44. licenses,
  45. ) == 0 {
  46. t.Fatal(
  47. "\nlkcp9_license_test.TestLicense.licenses FAILURE:",
  48. )
  49. } else {
  50. t.Log(
  51. fmt.Sprintf(
  52. "\nEmbedded Licesnse data:\n%v\n",
  53. licenses,
  54. ),
  55. )
  56. }
  57. }