config_test.go 619 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * ECAL
  3. *
  4. * Copyright 2020 Matthias Ladkau. All rights reserved.
  5. *
  6. * This Source Code Form is subject to the terms of the MIT
  7. * License, If a copy of the MIT License was not distributed with this
  8. * file, You can obtain one at https://opensource.org/licenses/MIT.
  9. */
  10. package config
  11. import (
  12. "testing"
  13. )
  14. func TestConfig(t *testing.T) {
  15. if res := Str(WorkerCount); res != "1" {
  16. t.Error("Unexpected result:", res)
  17. return
  18. }
  19. if res := Bool(WorkerCount); !res {
  20. t.Error("Unexpected result:", res)
  21. return
  22. }
  23. if res := Int(WorkerCount); res != 1 {
  24. t.Error("Unexpected result:", res)
  25. return
  26. }
  27. }