Skip to content

Commit

Permalink
intergration_tests: add multiplication test (#199)
Browse files Browse the repository at this point in the history
This is a follow-up for #196.
  • Loading branch information
quasilyte authored Feb 9, 2024
1 parent a5ae3b3 commit fd70063
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions integration_tests/cairo_files/hintrefs.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ func ap_plus_fp_deref() -> felt {
return [ap]; // 355
}

// cast([fp] * [fp + 1], felt)
func fp_locals_mul() -> felt {
alloc_locals;
local l1 = 11;
local l2 = 22;
let a = l1 * l2;
%{ memory[ap] = ids.a %}
return [ap]; // 242
}

func main() {
alloc_locals;
Expand All @@ -59,6 +69,8 @@ func main() {
[ap] = v3, ap++;
local v4 = ap_plus_fp_deref();
[ap] = v4, ap++;
local v5 = fp_locals_mul();
[ap] = v5, ap++;
ret;
}

0 comments on commit fd70063

Please sign in to comment.