Disable tests for procedures and for loops, which are unsupported

This commit is contained in:
John David Pressman 2019-09-24 16:20:52 -07:00
parent ada8a2b703
commit 9bb0d3aa9f
3 changed files with 15 additions and 9 deletions

View File

@ -16,12 +16,12 @@ function while_sum (var n : nat) : nat is block {
} }
} with r } with r
function for_sum (var n : nat) : nat is block { (* function for_sum (var n : nat) : nat is block {
for i := 1 to 100 for i := 1 to 100
begin begin
n := n + 1; n := n + 1;
end } end }
with n with n *)
function dummy (const n : nat) : nat is block { function dummy (const n : nat) : nat is block {
while (False) block { skip } while (False) block { skip }

View File

@ -1,6 +1,11 @@
// Test a trivial PascaLIGO procedure // Test a trivial PascaLIGO procedure
procedure main (const i : int) : int is procedure sub (const j: int) is
begin begin
skip i := i + 1
end with i end
function main (const i: int) : int is
begin
sub(i)
end with i

View File

@ -16,10 +16,11 @@ let function_ () : unit result =
let make_expect = fun n -> n in let make_expect = fun n -> n in
expect_eq_n_int program "main" make_expect expect_eq_n_int program "main" make_expect
let procedure () : unit result = (* Procedures are not supported yet
let procedure () : unit result =
let%bind program = type_file "./contracts/procedure.ligo" in let%bind program = type_file "./contracts/procedure.ligo" in
let make_expect = fun n -> n in let make_expect = fun n -> n + 1 in
expect_eq_n_int program "main" make_expect expect_eq_n_int program "main" make_expect *)
let assign () : unit result = let assign () : unit result =
let%bind program = type_file "./contracts/assign.ligo" in let%bind program = type_file "./contracts/assign.ligo" in
@ -683,7 +684,7 @@ let website2_ligo () : unit result =
let main = test_suite "Integration (End to End)" [ let main = test_suite "Integration (End to End)" [
test "type alias" type_alias ; test "type alias" type_alias ;
test "function" function_ ; test "function" function_ ;
test "procedure" procedure ; (* test "procedure" procedure ; *)
test "assign" assign ; test "assign" assign ;
test "declaration local" declaration_local ; test "declaration local" declaration_local ;
test "complex function" complex_function ; test "complex function" complex_function ;