aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2021-05-25 20:39:45 +0200
committerLibravatar Rutger Broekhoff2021-05-25 20:39:45 +0200
commitf78b029e55db9bce054d7b7cb7e290f2a4ade964 (patch)
treef18b6fb7517423dca1b644028dbe56b1bdacf1ec
parent11a48061b0f52d36e0919a6d9a6d90d251141eb2 (diff)
downloadzig-nkeys-f78b029e55db9bce054d7b7cb7e290f2a4ade964.tar.gz
zig-nkeys-f78b029e55db9bce054d7b7cb7e290f2a4ade964.zip
Give all tests names
-rw-r--r--src/nkeys.zig4
-rw-r--r--tool/znk.zig2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nkeys.zig b/src/nkeys.zig
index 1d15623..05922bd 100644
--- a/src/nkeys.zig
+++ b/src/nkeys.zig
@@ -455,7 +455,7 @@ fn wipeBytes(bs: []u8) void {
455 for (bs) |*b| b.* = 0; 455 for (bs) |*b| b.* = 0;
456} 456}
457 457
458test { 458test "reference all delcarations" {
459 testing.refAllDecls(@This()); 459 testing.refAllDecls(@This());
460 testing.refAllDecls(Role); 460 testing.refAllDecls(Role);
461 testing.refAllDecls(SeedKeyPair); 461 testing.refAllDecls(SeedKeyPair);
@@ -463,7 +463,7 @@ test {
463 testing.refAllDecls(PrivateKey); 463 testing.refAllDecls(PrivateKey);
464} 464}
465 465
466test { 466test "key conversions" {
467 var key_pair = try SeedKeyPair.generate(.server); 467 var key_pair = try SeedKeyPair.generate(.server);
468 var decoded_seed = try SeedKeyPair.fromTextSeed(&key_pair.seedText()); 468 var decoded_seed = try SeedKeyPair.fromTextSeed(&key_pair.seedText());
469 try testing.expect(isValidEncoding(&decoded_seed.seedText())); 469 try testing.expect(isValidEncoding(&decoded_seed.seedText()));
diff --git a/tool/znk.zig b/tool/znk.zig
index 6097a09..24a8ca4 100644
--- a/tool/znk.zig
+++ b/tool/znk.zig
@@ -500,7 +500,7 @@ pub fn readKeyFile(allocator: *Allocator, file: fs.File) ?Nkey {
500 return null; 500 return null;
501} 501}
502 502
503test { 503test "reference all declarations" {
504 testing.refAllDecls(@This()); 504 testing.refAllDecls(@This());
505 testing.refAllDecls(Nkey); 505 testing.refAllDecls(Nkey);
506 testing.refAllDecls(PrefixKeyGenerator); 506 testing.refAllDecls(PrefixKeyGenerator);