Infrastructure to test and implement the replacement of an 'expect' failure with an error production

Last command run was 'cargo test expect_fail'
This commit is contained in:
Chelsea Troy 2022-01-16 22:01:17 -06:00
parent 922d8e57c7
commit 085c02ffee
7 changed files with 108 additions and 36 deletions

View file

@ -305,10 +305,15 @@ pub fn getExpectFailures() []Failure {
return failures[0..failure_length];
}
pub fn getExpectFailuresC() callconv(.C) *c_void {
const CSlice = extern struct {
pointer: *c_void,
len: usize,
};
pub fn getExpectFailuresC() callconv(.C) CSlice {
var bytes = @ptrCast(*c_void, failures);
return bytes;
return .{.pointer = bytes, .len = failure_length};
}
pub fn deinitFailures() void {