nim-eth/tests/keyfile/test_uuid.nim

26 lines
559 B
Nim
Raw Normal View History

2019-02-05 10:45:09 +00:00
#
# Ethereum KeyFile
# (c) Copyright 2018
# Status Research & Development GmbH
#
# Licensed under either of
# Apache License, version 2.0, (LICENSE-APACHEv2)
# MIT license (LICENSE-MIT)
{.used.}
import
unittest,
../../eth/keyfile/uuid
2019-02-05 10:45:09 +00:00
suite "Cross-platform UUID test suite":
test "Platform UUID check":
check uuidGenerate().isOk
2019-02-05 10:45:09 +00:00
test "Conversion test":
let u = uuidGenerate()[]
2019-02-05 10:45:09 +00:00
check:
len($u) == 36
$uuidFromString($u)[] == $u
uuidToString(u) == $u