2020-12-21 11:45:07 +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.}
|
|
|
|
|
2021-06-09 14:59:52 +00:00
|
|
|
import
|
2022-01-14 09:51:22 +00:00
|
|
|
unittest2,
|
2021-06-09 14:59:52 +00:00
|
|
|
../../eth/keyfile/uuid
|
2020-12-21 11:45:07 +00:00
|
|
|
|
|
|
|
suite "Cross-platform UUID test suite":
|
|
|
|
test "Platform UUID check":
|
|
|
|
check uuidGenerate().isOk
|
|
|
|
|
|
|
|
test "Conversion test":
|
|
|
|
let u = uuidGenerate()[]
|
|
|
|
check:
|
|
|
|
len($u) == 36
|
|
|
|
$uuidFromString($u)[] == $u
|
|
|
|
uuidToString(u) == $u
|