-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
102 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
const std = @import("std"); | ||
const czmq = @cImport(@cInclude("czmq.h")); | ||
pub const czmq = @cImport(@cInclude("czmq.h")); | ||
const testing = std.testing; | ||
const debug = std.debug; | ||
const tls = std.crypto.tls; | ||
const x25519 = std.crypto.dh.X25519; | ||
const cstr = [*:0]const u8; | ||
const str = []const u8; | ||
|
||
test "Reference all decls" { | ||
_ = czmq; | ||
testing.refAllDecls(@This()); | ||
} | ||
|
||
test "Hello 0MQ" { | ||
const msg: cstr = "Hello, Curves!\n"; | ||
var publisher: ?*czmq.zsock_t = czmq.zsock_new(czmq.ZMQ_PUB); | ||
czmq.zsock_set_curve_server(publisher, @boolToInt(true)); | ||
debug.print("\nHello, Curves!{s}", .{"\n"}); | ||
debug.print("\n{s}", .{msg}); | ||
czmq.zsock_destroy(&publisher); | ||
} |