Skip to content

Commit

Permalink
Test the difference between label and result types in a loop (WebAsse…
Browse files Browse the repository at this point in the history
  • Loading branch information
pepyakin authored and binji committed Jan 31, 2018
1 parent e04f14a commit d2fd48e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/core/labels.wast
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
)
)

(func (export "loop6") (result i32)
(loop (result i32)
(br_if 0 (i32.const 0))
(i32.const 3)
)
)

(func (export "if") (result i32)
(local $i i32)
(set_local $i (i32.const 0))
Expand Down Expand Up @@ -280,6 +287,7 @@
(assert_return (invoke "loop3") (i32.const 1))
(assert_return (invoke "loop4" (i32.const 8)) (i32.const 16))
(assert_return (invoke "loop5") (i32.const 2))
(assert_return (invoke "loop6") (i32.const 3))
(assert_return (invoke "if") (i32.const 5))
(assert_return (invoke "if2") (i32.const 5))
(assert_return (invoke "switch" (i32.const 0)) (i32.const 50))
Expand Down

0 comments on commit d2fd48e

Please sign in to comment.