diff options
| author | Marvin W <git@larma.de> | 2026-10-04 22:02:19 +0200 |
|---|---|---|
| committer | Marvin W <git@larma.de> | 2026-10-23 17:01:43 +0200 |
| commit | 3e136fc57a2e509e5a4dd265a798b196205b0a80 (patch) | |
| tree | c8f9fc5d82bc458c27cf378bf1bf3f0fda51497b /xmpp-vala/tests/common.vala | |
| parent | 630b1368331ef0034b343bd2f00b116c8cd90391 (diff) | |
Fix more warnings
Diffstat (limited to 'xmpp-vala/tests/common.vala')
| -rw-r--r-- | xmpp-vala/tests/common.vala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xmpp-vala/tests/common.vala b/xmpp-vala/tests/common.vala index 823423b7..978bca62 100644 --- a/xmpp-vala/tests/common.vala +++ b/xmpp-vala/tests/common.vala @@ -24,9 +24,9 @@ void fail_if_reached(string? reason = null) { fail_if(true, reason); } -delegate void ErrorFunc() throws Error; +public delegate void ErrorFunc() throws Error; -void fail_if_not_error_code(ErrorFunc func, int expectedCode, string? reason = null) { +public void fail_if_not_error_code(ErrorFunc func, int expectedCode, string? reason = null) { try { func(); fail_if_reached(@"$(reason + ": " ?? "")no error thrown"); @@ -104,20 +104,20 @@ bool fail_if_eq_str(string? left, string? right, string? reason = null) { return fail_if(!nullcheck && left == right, @"$(reason + ": " ?? "")'$left' == '$right'"); } -bool fail_if_not_eq_uint8_arr(uint8[] left, uint8[] right, string? reason = null) { +public bool fail_if_not_eq_uint8_arr(uint8[] left, uint8[] right, string? reason = null) { if (fail_if_not_eq_int(left.length, right.length, @"$(reason + ": " ?? "")array length not equal")) return true; return fail_if_not_eq_str(Base64.encode(left), Base64.encode(right), reason); } -bool fail_if_not_zero_int(int zero, string? reason = null) { +public bool fail_if_not_zero_int(int zero, string? reason = null) { return fail_if_not_eq_int(zero, 0, reason); } -bool fail_if_zero_int(int zero, string? reason = null) { +public bool fail_if_zero_int(int zero, string? reason = null) { return fail_if_eq_int(zero, 0, reason); } -bool fail_if_null(void* what, string? reason = null) { +public bool fail_if_null(void* what, string? reason = null) { return fail_if(what == null || (size_t)what == 0, reason); } |
