You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c5c5b37
Browse filesBrowse the repository at this point in the historyBrowse files
if (response.status==trystd.meta.intToEnum(http.Status, assert_status_code)) {
39
-
stderr.print("[Fail] Expected status code to NOT equal {d}, got {d}\n", .{ assert_status_code, @intFromEnum(response.status.?) }) catchreturnerror.StatusCodesMatchButShouldnt;
39
+
stderr.print("[Fail] Expected status code to NOT equal {d}, got {d}\n", .{ assert_status_code, @intFromEnum(response.status.?) }) catch{};
if (std.mem.eql(u8, response.body, assertion.value)) {
44
-
stderr.print("[Fail] Expected body content to NOT equal \"{s}\", got \"{s}\"\n", .{ assertion.value, response.body }) catchreturnerror.BodyContentMatchesButShouldnt;
44
+
stderr.print("[Fail] Expected body content to NOT equal \"{s}\", got \"{s}\"\n", .{ assertion.value, response.body }) catch{};
if (std.mem.indexOf(u8, response.body, assertion.value) ==null) {
85
-
stderr.print("[Fail] Expected body content to NOT contain \"{s}\", got \"{s}\"\n", .{ assertion.value, response.body }) catchreturnerror.BodyContentNotContains;
85
+
stderr.print("[Fail] Expected body content to NOT contain \"{s}\", got \"{s}\"\n", .{ assertion.value, response.body }) catch{};
86
86
returnerror.BodyContentNotContains;
87
87
}
88
88
} else {
89
-
stderr.print("[Fail] Invalid assertion key for contains: {s}\n", .{assertion.key}) catchreturnerror.InvalidAssertionKey;
89
+
stderr.print("[Fail] Invalid assertion key for contains: {s}\n", .{assertion.key}) catch {};
90
+
returnerror.InvalidAssertionKey;
91
+
}
92
+
},
93
+
.not_contains=> {
94
+
if (std.ascii.eqlIgnoreCase(assertion.key, "status")) {
95
+
varstatus_buf: [3]u8=undefined;
96
+
conststatus_code=@intFromEnum(response.status.?); // .? if status is optional
0 commit comments