Skip to content

Commit

Permalink
xmas: separates packet tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joemfb committed Apr 23, 2024
1 parent bb2f7e1 commit 7e10047
Show file tree
Hide file tree
Showing 5 changed files with 497 additions and 531 deletions.
9 changes: 6 additions & 3 deletions pkg/vere/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ cc_library(
name = "xmas_src",
hdrs = ["io/xmas.c"],
)
cc_library(
name = "pact_src",
hdrs = ["io/xmas/pact.c"],
)

cc_test(
name = "xmas_tests",
Expand All @@ -231,13 +235,12 @@ cc_test(
cc_test(
name = "pact_tests",
timeout = "short",
srcs = ["io/xmas/pact.c"],
srcs = ["pact_tests.c"],
features = select({
"@platforms//os:linux": ["fully_static_link"],
"//conditions:default": [],
}),
deps = [":vere"],
defines = ["PACT_TEST"]
deps = [":vere", ":pact_src"],
)


Expand Down
14 changes: 7 additions & 7 deletions pkg/vere/io/xmas.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ _xmas_czar_dns(c3_y imp_y, c3_c* zar_c)
}


/* _xmas_encode_path(): produce buf_y as a parsed path
/* u3_xmas_encode_path(): produce buf_y as a parsed path
*/
static u3_noun
_xmas_encode_path(c3_w len_w, c3_y* buf_y)
u3_noun
u3_xmas_encode_path(c3_w len_w, c3_y* buf_y)
{
u3_noun pro;
u3_noun* lit = &pro;
Expand Down Expand Up @@ -351,7 +351,7 @@ _dire_etch_ud(c3_d num_d)
*/
u3_noun _xmas_request_key(u3_xmas_name* nam_u)
{
u3_noun pax = _xmas_encode_path(nam_u->pat_s, (c3_y*)nam_u->pat_c);
u3_noun pax = u3_xmas_encode_path(nam_u->pat_s, (c3_y*)nam_u->pat_c);
u3_noun res = u3nt(u3i_chubs(2, nam_u->her_d), u3i_word(nam_u->rif_w), pax);
return res;
}
Expand Down Expand Up @@ -1262,7 +1262,7 @@ _name_to_scry(u3_xmas_name* nam_u)
u3_noun rif = _dire_etch_ud(nam_u->rif_w);
u3_noun boq = _dire_etch_ud(nam_u->boq_y);
u3_noun fag = _dire_etch_ud(nam_u->fra_w);
u3_noun pax = _xmas_encode_path(nam_u->pat_s, (c3_y*)nam_u->pat_c);
u3_noun pax = u3_xmas_encode_path(nam_u->pat_s, (c3_y*)nam_u->pat_c);

u3_noun wer = nam_u->nit_o == c3y
? u3nc(c3__init, pax)
Expand Down Expand Up @@ -1671,8 +1671,8 @@ _xmas_plan_mess(u3_xmas* sam_u,
}

{
u3_noun pax = _xmas_encode_path(nam_u->pat_s,
(c3_y*)(nam_u->pat_c));
u3_noun pax = u3_xmas_encode_path(nam_u->pat_s,
(c3_y*)(nam_u->pat_c));
u3_noun par = u3nc(u3i_chubs(2, nam_u->her_d), pax);
u3_noun lan = u3nc(u3_nul, u3_xmas_encode_lane(*lan_u));
u3_noun dat = u3i_bytes(len_w, buf_y);
Expand Down
Loading

0 comments on commit 7e10047

Please sign in to comment.