sx sync: catch bindings take parens; Allocator.alloc -> alloc_bytes

This commit is contained in:
agra
2026-06-11 22:58:22 +03:00
parent ea2cf14f48
commit a93a9a922b
5 changed files with 16 additions and 16 deletions

View File

@@ -108,7 +108,7 @@ check_rejects_bad_slug :: () -> bool {
a := valid_app();
a.slug = "Bad_Slug"; // uppercase + underscore
matched := false;
validate_app(a) catch e { matched = (e == error.BadSlug); };
validate_app(a) catch (e) { matched = (e == error.BadSlug); };
return matched;
}
@@ -116,7 +116,7 @@ check_rejects_empty_version :: () -> bool {
r := valid_release();
r.version = "";
matched := false;
validate_release(r) catch e { matched = (e == error.EmptyVersion); };
validate_release(r) catch (e) { matched = (e == error.EmptyVersion); };
return matched;
}
@@ -124,7 +124,7 @@ check_rejects_bad_version :: () -> bool {
r := valid_release();
r.version = "1.2"; // missing PATCH component
matched := false;
validate_release(r) catch e { matched = (e == error.BadVersion); };
validate_release(r) catch (e) { matched = (e == error.BadVersion); };
return matched;
}
@@ -137,7 +137,7 @@ check_rejects_bad_channel :: () -> bool {
c := valid_channel();
c.name = "Bad Channel"; // space + uppercase
matched := false;
validate_channel(c) catch e { matched = (e == error.BadChannelName); };
validate_channel(c) catch (e) { matched = (e == error.BadChannelName); };
return matched;
}
@@ -145,7 +145,7 @@ check_rejects_empty_content_type :: () -> bool {
a := valid_artifact();
a.content_type = ""; // required string cleared
matched := false;
validate_artifact(a) catch e { matched = (e == error.MissingField); };
validate_artifact(a) catch (e) { matched = (e == error.MissingField); };
return matched;
}
@@ -153,7 +153,7 @@ check_rejects_bad_size :: () -> bool {
a := valid_artifact();
a.size_bytes = -1; // a content-addressed artifact has positive bytes
matched := false;
validate_artifact(a) catch e { matched = (e == error.BadSize); };
validate_artifact(a) catch (e) { matched = (e == error.BadSize); };
return matched;
}
@@ -161,7 +161,7 @@ check_rejects_bad_digest :: () -> bool {
a := valid_artifact();
a.sha256 = "not-a-sha"; // not 64 lowercase-hex chars
matched := false;
validate_artifact(a) catch e { matched = (e == error.BadDigest); };
validate_artifact(a) catch (e) { matched = (e == error.BadDigest); };
return matched;
}