fn expectError(expected_error: anyerror, actual_error_union: anytype) !void

This function is intended to be used only in tests. It prints diagnostics to stderr and then returns a test failure error when actual_error_union is not expected_error.

Parameters

expected_error: anyerror,
actual_error_union: anytype,