diff --git a/src/TODO b/src/TODO index 77c587107bd5a93f4bbcf4e33a2520405370a64e..70e05dc8aee75a4042d493725623dba904d0443c 100644 --- a/src/TODO +++ b/src/TODO @@ -31,6 +31,8 @@ implicite. Autorise-t'on ce genre de truc ? * Ident.idref : a remettre dans SyntaxTree ? +* verifier que chacun des exemples du repertoire "should_fail" à une +correspondance dans le manuel, et reciproquement... *********************************************************************************** *** a faire diff --git a/src/test/should_work/demo/tranche.lus b/src/test/should_fail/semantics/tranche.lus similarity index 97% rename from src/test/should_work/demo/tranche.lus rename to src/test/should_fail/semantics/tranche.lus index 668e82c0d474fc7296678ad251bcee98661c0c36..81bfe0a33fe59b852a909c7b9ecafc443988b902 100644 --- a/src/test/should_work/demo/tranche.lus +++ b/src/test/should_fail/semantics/tranche.lus @@ -5,7 +5,8 @@ type const n : t; m = n[3][2]; - s : t2; + + s : t2; o = s[9][8][7][6]; node tranche(a: bool^3) returns (res: bool); diff --git a/src/test/should_fail/syntax/record.lus b/src/test/should_fail/syntax/record.lus new file mode 100644 index 0000000000000000000000000000000000000000..8fb993765f2a3d0a7da86442d42aeb9f64c59abc --- /dev/null +++ b/src/test/should_fail/syntax/record.lus @@ -0,0 +1,12 @@ +type + + struct1 = {a: int; b: real}; + struct2 = {a: real; b: struct1}; + + -- does not work in ocaml either... + struct2bis = {a: real; b: {a: real; b:real}}; + +node record(a: struct2) returns (b: struct); + let + b = {a = a.x; b = { a = a.b.y; b = a.b.z } }; + tel diff --git a/src/test/should_work/to_sort_out/asservi.lus b/src/test/should_work/to_sort_out/asservi.lus index ecc36beeba489f62a55acb85107278da4c2d3216..d89e17eb48d83abe5c374a4db5cbf839e01f91f7 100644 --- a/src/test/should_work/to_sort_out/asservi.lus +++ b/src/test/should_work/to_sort_out/asservi.lus @@ -2,13 +2,13 @@ type pendule; const T=0.1; L=2.0; G=10.0; -function sin(x:real) returns (y:real); +extern function sin(x:real) returns (y:real); -function cos(x:real) returns (y:real); +extern function cos(x:real) returns (y:real); -function sqrt(x:real) returns (y:real); +extern function sqrt(x:real) returns (y:real); -function make_pend(x0,y0,x,y:real) returns (p:pendule); +extern function make_pend(x0,y0,x,y:real) returns (p:pendule); node I(dx:real) returns (x:real); --un integrateur ------------------------------------------------------------- diff --git a/src/test/should_work/to_sort_out/const2.lus b/src/test/should_work/to_sort_out/const2.lus index 6a7728e8fc58e02882c8ac6a866a97cbab888117..203ff878962de71e49286bbb4b2fbb05fc65c4f5 100644 --- a/src/test/should_work/to_sort_out/const2.lus +++ b/src/test/should_work/to_sort_out/const2.lus @@ -2,8 +2,11 @@ const -- Ylv6: const2 Error : at `->' in file `const2.lus' (l.15/c.24) : not allowed in constant expression. e3 = true when false -> true; - - + M = 3; + P= 2; + N = M*P; + O= M; + c10=12; type t1 = int; diff --git a/src/test/should_work/to_sort_out/record.lus b/src/test/should_work/to_sort_out/record.lus deleted file mode 100644 index 013adc452408308cc669ed59d367281b60beef4b..0000000000000000000000000000000000000000 --- a/src/test/should_work/to_sort_out/record.lus +++ /dev/null @@ -1,8 +0,0 @@ -type - struct = {a: int; b: {a: int; b:int}}; - struct2 = {a: real; b: {a: real; b:real}}; - -node record(a: struct2) returns (b: struct); - let - b = {a = a.x; b = { a = a.b.y; b = a.b.z } }; - tel