mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
take alignment into account when calculating stack size
This commit is contained in:
parent
2786e0e3d6
commit
eb5439ee96
3 changed files with 36 additions and 1 deletions
|
@ -2529,3 +2529,25 @@ fn pattern_match_unit_tag() {
|
|||
i64
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mirror_llvm_alignment_padding() {
|
||||
// see https://github.com/rtfeldman/roc/issues/1569
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [ main ] to "./platform"
|
||||
|
||||
main : Str
|
||||
main =
|
||||
p1 = {name : "test1", test: 1 == 1 }
|
||||
|
||||
List.map [p1, p1 ] (\{ test } -> if test then "pass" else "fail")
|
||||
|> Str.joinWith "\n"
|
||||
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"pass\npass"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue