Skip to content

Commit

Permalink
tests: Fix LIT checks in new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ayrtonm committed Oct 14, 2024
1 parent f071e6b commit 40a9587
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/rewrite_fn_ptr_eq/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ Test(rewrite_fn_ptr_eq, main) {
struct module *mod_ptr = &mod;
if (mod_ptr->fn) { }

// REWRITER: res = IA2_ADDR(fn) ? IA2_CALL(fn, _ZTSFiiiE)(1, 2) : -1;
// REWRITER: res = IA2_ADDR(fn) ? IA2_CALL(fn, _ZTSPFiiiE)(1, 2) : -1;
res = fn ? fn(1, 2) : -1;

// REWRITER: res = !IA2_ADDR(fn) ? -1 : IA2_CALL(fn, _ZTSFiiiE)(1, 2);
// REWRITER: res = !IA2_ADDR(fn) ? -1 : IA2_CALL(fn, _ZTSPFiiiE)(1, 2);
res = !fn ? -1 : fn(1, 2);

// REWRITER: res = x && IA2_ADDR(fn) ? IA2_CALL(fn, _ZTSFiiiE)(1, 2) : -1;
// REWRITER: res = x && IA2_ADDR(fn) ? IA2_CALL(fn, _ZTSPFiiiE)(1, 2) : -1;
res = x && fn ? fn(1, 2) : -1;

// REWRITER: res = IA2_ADDR(fn) && IA2_ADDR(fn2) ? IA2_CALL(fn, _ZTSFiiiE)(1, 2) + IA2_CALL(fn2, _ZTSFiiiE)(1, 2) : -1;
// REWRITER: res = IA2_ADDR(fn) && IA2_ADDR(fn2) ? IA2_CALL(fn, _ZTSPFiiiE)(1, 2) + IA2_CALL(fn2, _ZTSPFiiiE)(1, 2) : -1;
res = fn && fn2 ? fn(1, 2) + fn2(1, 2) : -1;

// REWRITER: fn = IA2_ADDR(fn2) ? fn2 : fn;
Expand Down

0 comments on commit 40a9587

Please sign in to comment.