mirror of
https://github.com/status-im/nim-eth.git
synced 2025-02-21 02:08:11 +00:00
* simplify some modules * mark several modules with raises * fix clearing of keys in auth.nim * fix keyfile case dropping off * fix keyfile stream storage * uuid should be output in lowercase * enode: simplify API
22 lines
539 B
Nim
22 lines
539 B
Nim
#
|
|
# Ethereum KeyFile
|
|
# (c) Copyright 2018
|
|
# Status Research & Development GmbH
|
|
#
|
|
# Licensed under either of
|
|
# Apache License, version 2.0, (LICENSE-APACHEv2)
|
|
# MIT license (LICENSE-MIT)
|
|
|
|
import eth/keyfile/uuid, unittest
|
|
|
|
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
|