diff options
| author | kristopher tate <kt@connectfree.co.jp> | 2018-07-22 03:11:55 +0900 |
|---|---|---|
| committer | kristopher tate <kt@connectfree.co.jp> | 2018-07-22 03:11:55 +0900 |
| commit | c5c053b6fdde911edd0b488c29fbef0e2aa0a904 (patch) | |
| tree | e37aef3627267102d3b4a4a91aa362a36394b57f | |
| parent | bc411af4ffb07fa0e8d713c300c2badd1116acff (diff) | |
| download | zig-c5c053b6fdde911edd0b488c29fbef0e2aa0a904.tar.gz zig-c5c053b6fdde911edd0b488c29fbef0e2aa0a904.zip | |
std.event.tcp: add switch statement in preparation for building-out abstractions;
depends on issue #1274 ;
| -rw-r--r-- | std/event/tcp.zig | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/std/event/tcp.zig b/std/event/tcp.zig index 27eab9f0bb..1542538082 100644 --- a/std/event/tcp.zig +++ b/std/event/tcp.zig @@ -123,10 +123,17 @@ pub async fn connect(loop: *Loop, _address: *const std.net.Address) !std.os.File } test "listen on a port, send bytes, receive bytes" { - if (builtin.os != builtin.Os.linux) { - // TODO build abstractions for other operating systems + // TODO build abstractions for other operating systems + const skip_test: bool = switch (builtin.os) { + builtin.Os.linux => false, + //builtin.Os.macosx, builtin.Os.ios => false, + else => true, + }; + + if (skip_test == true) { return error.skip; } + const MyServer = struct { tcp_server: Server, |
