scool r53: Add tests and refs

URL: https://svn.lrde.epita.fr/svn/scool/trunk ChangeLog: 2008-03-13 Maxime van Noppen <yabo@lrde.epita.fr> Add tests and refs * input/concept_1.scl: New. * input/sample_5.scl: New. * parser/sample_5.ref: New. * parser/sample_container.ref: New. * parser/var_decl_7.ref: New. * transformer/class_dec.ref: New. * transformer/consinit.ref: New. * transformer/funcall.ref: New. * transformer/funcall_no-args.ref: New. * transformer/function.ref: New. * transformer/function_call_1.ref: New. * transformer/function_call_2.ref: New. * transformer/function_decl_2.ref: New. * transformer/fundec.ref: New. * transformer/guard.ref: New. * transformer/manydec.ref: New. * transformer/sample_5.ref: New. * transformer/sample_container.ref: New. * transformer/vardec.ref: New. * transformer/varinit.ref: New. * transformer/wiki1.ref: New. * transformer/wiki3.ref: New. input/concept_1.scl | 6 ++++++ input/sample_5.scl | 4 ++++ parser/sample_5.ref | 1 + parser/sample_container.ref | 1 + parser/var_decl_7.ref | 1 + transformer/class_dec.ref | 15 +++++++++++++++ transformer/consinit.ref | 1 + transformer/funcall.ref | 4 ++++ transformer/funcall_no-args.ref | 4 ++++ transformer/function.ref | 4 ++++ transformer/function_call_1.ref | 4 ++++ transformer/function_call_2.ref | 4 ++++ transformer/function_decl_2.ref | 4 ++++ transformer/fundec.ref | 3 +++ transformer/guard.ref | 4 ++++ transformer/manydec.ref | 3 +++ transformer/sample_5.ref | 4 ++++ transformer/sample_container.ref | 19 +++++++++++++++++++ transformer/vardec.ref | 1 + transformer/varinit.ref | 1 + transformer/wiki1.ref | 7 +++++++ transformer/wiki3.ref | 8 ++++++++ 22 files changed, 103 insertions(+) Index: trunk/tests/input/sample_5.scl =================================================================== --- trunk/tests/input/sample_5.scl (revision 0) +++ trunk/tests/input/sample_5.scl (revision 53) @@ -0,0 +1,4 @@ +sqrt : (arg : float) -> float = +{ + -> |[ std::sqrt(arg); ]|; +} Index: trunk/tests/input/concept_1.scl =================================================================== --- trunk/tests/input/concept_1.scl (revision 0) +++ trunk/tests/input/concept_1.scl (revision 53) @@ -0,0 +1,6 @@ +box : concept = +{ + value : type; + + decl get_value : () -> value; +} Index: trunk/tests/transformer/sample_5.ref =================================================================== --- trunk/tests/transformer/sample_5.ref (revision 0) +++ trunk/tests/transformer/sample_5.ref (revision 53) @@ -0,0 +1,4 @@ +float sqrt(float arg) +{ + return std::sqrt(arg); +} Index: trunk/tests/transformer/funcall_no-args.ref =================================================================== --- trunk/tests/transformer/funcall_no-args.ref (revision 0) +++ trunk/tests/transformer/funcall_no-args.ref (revision 53) @@ -0,0 +1,4 @@ +int doit() +{ + return foo(); +} Index: trunk/tests/transformer/class_dec.ref =================================================================== --- trunk/tests/transformer/class_dec.ref (revision 0) +++ trunk/tests/transformer/class_dec.ref (revision 53) @@ -0,0 +1,15 @@ +// Class point + +template < typename E > +class point +{ + public: + int x() + { + return x; + } + + private: + int x; + int y; +}; Index: trunk/tests/transformer/manydec.ref =================================================================== --- trunk/tests/transformer/manydec.ref (revision 0) +++ trunk/tests/transformer/manydec.ref (revision 53) @@ -0,0 +1,3 @@ +const int answer = 42; +int i; +int j = i; Index: trunk/tests/transformer/function.ref =================================================================== --- trunk/tests/transformer/function.ref (revision 0) +++ trunk/tests/transformer/function.ref (revision 53) @@ -0,0 +1,4 @@ +int answer() +{ + return 42; +} Index: trunk/tests/transformer/consinit.ref =================================================================== --- trunk/tests/transformer/consinit.ref (revision 0) +++ trunk/tests/transformer/consinit.ref (revision 53) @@ -0,0 +1 @@ +const int i = 3; Index: trunk/tests/transformer/function_decl_2.ref =================================================================== --- trunk/tests/transformer/function_decl_2.ref (revision 0) +++ trunk/tests/transformer/function_decl_2.ref (revision 53) @@ -0,0 +1,4 @@ +template < int i > +int f() +{ +} Index: trunk/tests/transformer/function_call_1.ref =================================================================== --- trunk/tests/transformer/function_call_1.ref (revision 0) +++ trunk/tests/transformer/function_call_1.ref (revision 53) @@ -0,0 +1,4 @@ +int doit() +{ + return foo(); +} Index: trunk/tests/transformer/function_call_2.ref =================================================================== --- trunk/tests/transformer/function_call_2.ref (revision 0) +++ trunk/tests/transformer/function_call_2.ref (revision 53) @@ -0,0 +1,4 @@ +int doit() +{ + return foo(bar, baz); +} Index: trunk/tests/transformer/fundec.ref =================================================================== --- trunk/tests/transformer/fundec.ref (revision 0) +++ trunk/tests/transformer/fundec.ref (revision 53) @@ -0,0 +1,3 @@ +bool f(int a, int b) +{ +} Index: trunk/tests/transformer/vardec.ref =================================================================== --- trunk/tests/transformer/vardec.ref (revision 0) +++ trunk/tests/transformer/vardec.ref (revision 53) @@ -0,0 +1 @@ +int i; Index: trunk/tests/transformer/varinit.ref =================================================================== --- trunk/tests/transformer/varinit.ref (revision 0) +++ trunk/tests/transformer/varinit.ref (revision 53) @@ -0,0 +1 @@ +int i = 42; Index: trunk/tests/transformer/sample_container.ref =================================================================== --- trunk/tests/transformer/sample_container.ref (revision 0) +++ trunk/tests/transformer/sample_container.ref (revision 53) @@ -0,0 +1,19 @@ +// Class Container + +template < typename E > +class Container +{ + public: + type value_type; + type iterator; + type const_iterator; + type reference; + type const_reference; + type size_type; + iterator begin(); + const_iterator begin(); + iterator end(); + const_iterator end(); + size_type size(); + bool empty(); +}; Index: trunk/tests/transformer/funcall.ref =================================================================== --- trunk/tests/transformer/funcall.ref (revision 0) +++ trunk/tests/transformer/funcall.ref (revision 53) @@ -0,0 +1,4 @@ +int doit() +{ + return foo(bar, baz); +} Index: trunk/tests/transformer/wiki1.ref =================================================================== --- trunk/tests/transformer/wiki1.ref (revision 0) +++ trunk/tests/transformer/wiki1.ref (revision 53) @@ -0,0 +1,7 @@ +void f() +{ + const int16 i = 3; + i = 4; + int16 j = 3; + j = 4; +} Index: trunk/tests/transformer/wiki3.ref =================================================================== --- trunk/tests/transformer/wiki3.ref (revision 0) +++ trunk/tests/transformer/wiki3.ref (revision 53) @@ -0,0 +1,8 @@ +void f() +{ + int i; + int j; + i = 0; + j = i; + i = j + i; +} Index: trunk/tests/transformer/guard.ref =================================================================== --- trunk/tests/transformer/guard.ref (revision 0) +++ trunk/tests/transformer/guard.ref (revision 53) @@ -0,0 +1,4 @@ +template < int i > +int f() +{ +} Index: trunk/tests/parser/sample_5.ref =================================================================== --- trunk/tests/parser/sample_5.ref (revision 0) +++ trunk/tests/parser/sample_5.ref (revision 53) @@ -0,0 +1 @@ +Program([FunDec([],"sqrt",[("arg",Var("float"))],Var("float"),[Return(Cxx("std::sqrt(arg);"))])]) Index: trunk/tests/parser/var_decl_7.ref =================================================================== --- trunk/tests/parser/var_decl_7.ref (revision 0) +++ trunk/tests/parser/var_decl_7.ref (revision 53) @@ -0,0 +1 @@ +Program([VarDec([],"a",StaticFunCall("test",[Var("int")]))]) Index: trunk/tests/parser/sample_container.ref =================================================================== --- trunk/tests/parser/sample_container.ref (revision 0) +++ trunk/tests/parser/sample_container.ref (revision 53) @@ -0,0 +1 @@ +Program([ConstDec([],"Container",Class,ClassVal([Accessblock(Public,[ConstDec([],"value_type",None,Var("type")),ConstDec([],"iterator",None,Var("type")),ConstDec([],"const_iterator",None,Var("type")),ConstDec([],"reference",None,Var("type")),ConstDec([],"const_reference",None,Var("type")),ConstDec([],"size_type",None,Var("type")),ConstDec(["decl"],"begin",None,FunType([],Var("iterator"))),ConstDec(["decl"],"begin",Some("const"),FunType([],Var("const_iterator"))),ConstDec(["decl"],"end",None,FunType([],Var("iterator"))),ConstDec(["decl"],"end",Some("const"),FunType([],Var("const_iterator"))),ConstDec(["decl"],"size",Some("const"),FunType([],Var("size_type"))),ConstDec(["decl"],"empty",Some("const"),FunType([],Var("bool")))])]))]) -- \__/ \__/ (00) Maxime `yabo` van Noppen (00) ___) \ Epita 2009 / (___ (_____/ Président de Prologin \_____)

On Thu, Mar 13, 2008 at 8:34 PM, Maxime van Noppen <yabo@lrde.epita.fr> wrote:
Index: trunk/tests/parser/sample_5.ref =================================================================== --- trunk/tests/parser/sample_5.ref (revision 0) +++ trunk/tests/parser/sample_5.ref (revision 53) @@ -0,0 +1 @@ +Program([FunDec([],"sqrt",[("arg",Var("float"))],Var("float"),[Return(Cxx("std::sqrt(arg);"))])]) Index: trunk/tests/parser/var_decl_7.ref =================================================================== --- trunk/tests/parser/var_decl_7.ref (revision 0) +++ trunk/tests/parser/var_decl_7.ref (revision 53) @@ -0,0 +1 @@ +Program([VarDec([],"a",StaticFunCall("test",[Var("int")]))]) Index: trunk/tests/parser/sample_container.ref =================================================================== --- trunk/tests/parser/sample_container.ref (revision 0) +++ trunk/tests/parser/sample_container.ref (revision 53) @@ -0,0 +1 @@ +Program([ConstDec([],"Container",Class,ClassVal([Accessblock(Public,[ConstDec([],"value_type",None,Var("type")),ConstDec([],"iterator",None,Var("type")),ConstDec([],"const_iterator",None,Var("type")),ConstDec([],"reference",None,Var("type")),ConstDec([],"const_reference",None,Var("type")),ConstDec([],"size_type",None,Var("type")),ConstDec(["decl"],"begin",None,FunType([],Var("iterator"))),ConstDec(["decl"],"begin",Some("const"),FunType([],Var("const_iterator"))),ConstDec(["decl"],"end",None,FunType([],Var("iterator"))),ConstDec(["decl"],"end",Some("const"),FunType([],Var("const_iterator"))),ConstDec(["decl"],"size",Some("const"),FunType([],Var("size_type"))),ConstDec(["decl"],"empty",Some("const"),FunType([],Var("bool")))])]))])
I think you may want this small script: ~pierron/mbin/diff-aterm -- Nicolas Pierron
participants (2)
-
Maxime van Noppen
-
Nicolas Pierron