Merge branch '8-reporting-of-error-messages' of gitlab.com:ligolang/ligo into 8-reporting-of-error-messages
This commit is contained in:
commit
4d121602eb
6
src/contracts/lambda.ligo
Normal file
6
src/contracts/lambda.ligo
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
function f (const x : unit) : unit is
|
||||||
|
begin skip end with unit
|
||||||
|
|
||||||
|
function main (const p : unit ; const s : unit) : unit is
|
||||||
|
var y : unit := f(unit) ;
|
||||||
|
begin skip end with y
|
6
src/contracts/parser-bad-reported-term.ligo
Normal file
6
src/contracts/parser-bad-reported-term.ligo
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
function f (const x : unit) : unit is
|
||||||
|
begin skip end with unit
|
||||||
|
|
||||||
|
function main (const p : unit ; const s : unit) : unit is
|
||||||
|
behin skip end with f unit
|
||||||
|
// the srcloc is correct but the reported term is "skip" instead of "behin".
|
@ -508,6 +508,12 @@ let lambda_mligo () : unit result =
|
|||||||
let make_expected = (e_unit ()) in
|
let make_expected = (e_unit ()) in
|
||||||
expect_eq program "main" make_input make_expected
|
expect_eq program "main" make_input make_expected
|
||||||
|
|
||||||
|
let lambda_ligo () : unit result =
|
||||||
|
let%bind program = type_file "./contracts/lambda.ligo" in
|
||||||
|
let make_input = e_pair (e_unit ()) (e_unit ()) in
|
||||||
|
let make_expected = (e_unit ()) in
|
||||||
|
expect_eq program "main" make_input make_expected
|
||||||
|
|
||||||
let lambda2_mligo () : unit result =
|
let lambda2_mligo () : unit result =
|
||||||
let%bind program = mtype_file "./contracts/lambda2.mligo" in
|
let%bind program = mtype_file "./contracts/lambda2.mligo" in
|
||||||
let make_input = e_pair (e_unit ()) (e_unit ()) in
|
let make_input = e_pair (e_unit ()) (e_unit ()) in
|
||||||
@ -574,6 +580,7 @@ let main = test_suite "Integration (End to End)" [
|
|||||||
(* test "failwith mligo" failwith_mligo ; *)
|
(* test "failwith mligo" failwith_mligo ; *)
|
||||||
(* test "guess string mligo" guess_string_mligo ; WIP? *)
|
(* test "guess string mligo" guess_string_mligo ; WIP? *)
|
||||||
test "lambda mligo" lambda_mligo ;
|
test "lambda mligo" lambda_mligo ;
|
||||||
|
test "lambda ligo" lambda_ligo ;
|
||||||
(* test "lambda2 mligo" lambda2_mligo ; *)
|
(* test "lambda2 mligo" lambda2_mligo ; *)
|
||||||
test "website1 ligo" website1_ligo ;
|
test "website1 ligo" website1_ligo ;
|
||||||
test "website2 ligo" website2_ligo ;
|
test "website2 ligo" website2_ligo ;
|
||||||
|
Loading…
Reference in New Issue
Block a user