Initial Release
This commit is contained in:
commit
5a00e06cb9
81 changed files with 12670 additions and 0 deletions
14
test/tests_thespian.zig
Normal file
14
test/tests_thespian.zig
Normal file
|
@ -0,0 +1,14 @@
|
|||
const std = @import("std");
|
||||
const thespian = @import("thespian");
|
||||
const cbor = @import("cbor");
|
||||
|
||||
pub const unexpected = thespian.unexpected;
|
||||
const message = thespian.message;
|
||||
const error_message = thespian.error_message;
|
||||
|
||||
test "thespian.unexpected" {
|
||||
var buf: [512]u8 = undefined;
|
||||
try std.testing.expectEqual(error.Exit, unexpected(message.fmt(.{"TEST"})));
|
||||
const json = try cbor.toJson(error_message(), &buf);
|
||||
try std.testing.expectEqualStrings("[\"exit\",\"UNEXPECTED_MESSAGE: [\\\"TEST\\\"]\"]", json);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue