Skip to content

Commit 3426488

Browse files
proggeramlugRalph Küpper
andauthored
test(arkts): add byte_offset to Expr::Call inits — fix harmonyos-smoke compile after #5250 (#5288)
#5250 added `Expr::Call.byte_offset` but missed the `Expr::Call { .. }` initializers in perry-codegen-arkts's tests (3 in src/tests.rs, 3 in tests/phase2_full_app_smoke.rs). perry-codegen-arkts isn't built by the gating `cargo-test` job, only by the informational `harmonyos-smoke` job (continue-on-error), so this E0063 sat red on main — and on every open PR — without blocking anything. Mirrors the #5266 cheerio fix. After: `cargo test -p perry-codegen-arkts --lib` (111 passed) and `--test phase2_full_app_smoke` (2 passed) both green. No version/CHANGELOG/Cargo.lock edits. Co-authored-by: Ralph Küpper <ralph2@skelpo.com>
1 parent ff87ebd commit 3426488

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

crates/perry-codegen-arkts/src/tests.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,7 @@ fn state_method_call(state_id: u32, method: &str, args: Vec<Expr>) -> Expr {
960960
}),
961961
args,
962962
type_args: vec![],
963+
byte_offset: 0,
963964
}
964965
}
965966

@@ -2531,6 +2532,7 @@ fn issue_410_serialize_condition_fallback_has_no_block_comment_close() {
25312532
callee: Box::new(Expr::LocalGet(99)),
25322533
args: vec![],
25332534
type_args: vec![],
2535+
byte_offset: 0,
25342536
};
25352537
let s = serialize_condition(&unrecognized, &bindings, &consts);
25362538
assert!(
@@ -2762,6 +2764,7 @@ fn issue_410_conditional_modifier_chain_has_no_nested_block_comments() {
27622764
callee: Box::new(Expr::LocalGet(999)),
27632765
args: vec![],
27642766
type_args: vec![],
2767+
byte_offset: 0,
27652768
},
27662769
));
27672770
m.init.push(let_widget(

crates/perry-codegen-arkts/tests/phase2_full_app_smoke.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ fn full_phase2_app_emits_canonical_arkui() {
149149
}),
150150
args: vec![],
151151
type_args: vec![],
152+
byte_offset: 0,
152153
};
153154

154155
// --- Phase 2 v6 + v5: Button with state.set + inline style ---
@@ -160,6 +161,7 @@ fn full_phase2_app_emits_canonical_arkui() {
160161
}),
161162
args: vec![Expr::Number(1.0)],
162163
type_args: vec![],
164+
byte_offset: 0,
163165
})];
164166
let inc_button = nmc(
165167
"Button",
@@ -523,6 +525,7 @@ fn minimal_counter_app_emits_clean_page() {
523525
}),
524526
args: vec![],
525527
type_args: vec![],
528+
byte_offset: 0,
526529
},
527530
nmc(
528531
"Button",

0 commit comments

Comments
 (0)