test(ffi-linkage): xfail example for extern fn binding (Phase 1.0b)
Add examples/1223-ffi-extern-fn.sx — binds libc 'abs' via bare 'extern'
(sx name = C symbol, no rename). Hand-authored expected/ captures the
SUCCESS output (abs(-7)=7 / abs(42)=42, exit 0).
RED: 1223 is the sole corpus failure (634 ran, 1 failed) — it parses
then errors at sema ('body produces no value') because lowering does
not yet route extern fns through declareExtern. Phase 1.1 wires the
lowering and turns this green.
xfail commit per the cadence rule (no commit both adds a test and makes
it pass).
This commit is contained in:
1
examples/expected/1223-ffi-extern-fn.exit
Normal file
1
examples/expected/1223-ffi-extern-fn.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/expected/1223-ffi-extern-fn.stderr
Normal file
1
examples/expected/1223-ffi-extern-fn.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
2
examples/expected/1223-ffi-extern-fn.stdout
Normal file
2
examples/expected/1223-ffi-extern-fn.stdout
Normal file
@@ -0,0 +1,2 @@
|
||||
abs(-7) = 7
|
||||
abs(42) = 42
|
||||
Reference in New Issue
Block a user