scool r114: Add a compilation test with g++

URL: https://svn.lrde.epita.fr/svn/scool/branches/scool-ng ChangeLog: 2008-10-08 Maxime van Noppen <yabo@lrde.epita.fr> Add a compilation test with g++ * config: Add the compilation test. * class/c++_src/declaration_002.cc, * class/scool_ast/declaration_002.aterm, * class/c++_ast/declaration_002.aterm, * class/scool_src/declaration_002.scl: Add a Bar class so that the * code compiles. * class/c++_build/declaration_001.g++: New. * class/c++_build/empty.g++: New. * class/c++_build/empty_accessblocks.g++: New. * class/c++_build/empty_private.g++: New. * class/c++_build/empty_protected.g++: New. * class/c++_build/empty_public.g++: New. * class/c++_build/final_001.g++: New. * class/c++_build/inheritance_001.g++: New. * class/c++_build/inheritance_002.g++: New. * class/c++_build/member_001.g++: New. * class/c++_build/member_002.g++: New. * class/c++_build/method_001.g++: New. * class/c++_build/method_002.g++: New. * class/c++_build/method_003.g++: New. * class/c++_build/method_004.g++: New. * class/c++_build/method_005.g++: New. * class/c++_build: New. * concept/c++_build: New. * examples/c++_build: New. * expression/c++_build: New. * function/c++_build: New. * misc/c++_build: New. * type/c++_build: New. * variable/c++_build: New. class/c++_ast/declaration_002.aterm | 2 +- class/c++_src/declaration_002.cc | 2 ++ class/scool_ast/declaration_002.aterm | 2 +- class/scool_src/declaration_002.scl | 1 + config | 15 +++++++++++++++ 5 files changed, 20 insertions(+), 2 deletions(-) Index: branches/scool-ng/tests/class/c++_ast/declaration_002.aterm =================================================================== --- branches/scool-ng/tests/class/c++_ast/declaration_002.aterm (revision 113) +++ branches/scool-ng/tests/class/c++_ast/declaration_002.aterm (revision 114) @@ -1 +1 @@ -CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[("public",CxxType(CxxId("Bar"),[CxxId("Exact")]))])]) +CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Bar"),[]),CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[("public",CxxType(CxxId("Bar"),[CxxId("Exact")]))])]) Index: branches/scool-ng/tests/class/c++_src/declaration_002.cc =================================================================== --- branches/scool-ng/tests/class/c++_src/declaration_002.cc (revision 113) +++ branches/scool-ng/tests/class/c++_src/declaration_002.cc (revision 114) @@ -1,2 +1,4 @@ template < typename Exact > +class Bar; +template < typename Exact > class Foo: public Bar< Exact >; Index: branches/scool-ng/tests/class/scool_ast/declaration_002.aterm =================================================================== --- branches/scool-ng/tests/class/scool_ast/declaration_002.aterm (revision 113) +++ branches/scool-ng/tests/class/scool_ast/declaration_002.aterm (revision 114) @@ -1 +1 @@ -Program([ClassDeclaration(None,Identifier("Foo"),Some(ClassWhereClause([Inherits("Foo",SimpleType("Bar"))])))]) +Program([ClassDeclaration(None,Identifier("Bar"),None),ClassDeclaration(None,Identifier("Foo"),Some(ClassWhereClause([Inherits("Foo",SimpleType("Bar"))])))]) Index: branches/scool-ng/tests/class/scool_src/declaration_002.scl =================================================================== --- branches/scool-ng/tests/class/scool_src/declaration_002.scl (revision 113) +++ branches/scool-ng/tests/class/scool_src/declaration_002.scl (revision 114) @@ -1 +1,2 @@ +Bar : class; Foo : class where Foo -> Bar; Index: branches/scool-ng/tests/class/c++_build/method_005.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/declaration_001.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/empty_protected.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/inheritance_001.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/final_001.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/inheritance_002.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/empty_accessblocks.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/member_001.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/member_002.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/empty_private.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/empty_public.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/empty.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/method_001.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/method_002.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/method_003.g++ =================================================================== Index: branches/scool-ng/tests/class/c++_build/method_004.g++ =================================================================== Index: branches/scool-ng/tests/config =================================================================== --- branches/scool-ng/tests/config (revision 113) +++ branches/scool-ng/tests/config (revision 114) @@ -47,6 +47,21 @@ test_4 () { + desc="Compilation of generated code" + cmd='g++ -W -Wall -c $input_file' + cmp='diff -EwbB -u $ref $output' + print_input_cmd='cat $input_file' + print_output_cmd='cat $input_file' + + input_files="c++_src/*.cc" + input_extension=".cc" + + ref_dir="c++_build" + ref_extension=".g++" +} + +test_5 () +{ desc="Scool translator" cmd='sglri -p ../../src/scl-syn/Scool.tbl -i $input_file | ../../src/scoolt/scoolt | ../../src/pp-cxx/pp-cxx | abox2text' cmp='diff -EwbB -u $ref $output' -- \__/ \__/ (00) Maxime `yabo` van Noppen (00) ___) \ Epita 2009 / (___ (_____/ \_____)
participants (1)
-
Maxime van Noppen