From 17f3a0ade0109b52b10db8435017d7108337261e Mon Sep 17 00:00:00 2001 From: Anthony Drendel Date: Sun, 21 Feb 2021 11:10:33 +0100 Subject: [PATCH] Add tests for functions sharing same implementation --- test/core/exports.wast | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/core/exports.wast b/test/core/exports.wast index 0c44694dbf..ba7f7a7ca8 100644 --- a/test/core/exports.wast +++ b/test/core/exports.wast @@ -25,6 +25,16 @@ (module $Other1) (assert_return (invoke $Func "e" (i32.const 42)) (i32.const 43)) +(module + (type (;0;) (func (result i32))) + (func (;0;) (type 0) (result i32) i32.const 42) + (export "a" (func 0)) + (export "b" (func 0)) + (export "c" (func 0))) +(assert_return (invoke "a") (i32.const 42)) +(assert_return (invoke "b") (i32.const 42)) +(assert_return (invoke "c") (i32.const 42)) + (assert_invalid (module (export "a" (func 0))) "unknown function"