util_test.go 536 B

1234567891011121314151617181920212223242526
  1. /*
  2. * EliasDB
  3. *
  4. * Copyright 2016 Matthias Ladkau. All rights reserved.
  5. *
  6. * This Source Code Form is subject to the terms of the Mozilla Public
  7. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9. */
  10. package cluster
  11. import "testing"
  12. func TestToUInt64(t *testing.T) {
  13. if res := toUInt64("1"); res != 1 {
  14. t.Error("Unexpected result: ", res)
  15. return
  16. }
  17. if res := toUInt64(uint64(1)); res != 1 {
  18. t.Error("Unexpected result: ", res)
  19. return
  20. }
  21. }