diff options
Diffstat (limited to 'tests/arc/tarc_orc.nim')
-rw-r--r-- | tests/arc/tarc_orc.nim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/arc/tarc_orc.nim b/tests/arc/tarc_orc.nim new file mode 100644 index 000000000..879ece3c7 --- /dev/null +++ b/tests/arc/tarc_orc.nim @@ -0,0 +1,22 @@ +discard """ + matrix: "--mm:arc; --mm:orc" +""" + +block: + type + PublicKey = array[32, uint8] + PrivateKey = array[64, uint8] + + proc ed25519_create_keypair(publicKey: ptr PublicKey; privateKey: ptr PrivateKey) = + publicKey[][0] = uint8(88) + + type + KeyPair = object + public: PublicKey + private: PrivateKey + + proc initKeyPair(): KeyPair = + ed25519_create_keypair(result.public.addr, result.private.addr) + + let keys = initKeyPair() + doAssert keys.public[0] == 88 |