From: Maxime van Noppen <yabo(a)lrde.epita.fr>
To: transformers-patches(a)lrde.epita.fr, olena-patches(a)lrde.epita.fr
Subject: scool r124: Add reference files for tests on static functions
URL:
https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2008-10-31 Maxime van Noppen <yabo(a)lrde.epita.fr>
Add reference files for tests on static functions.
* config: Little hack to avoid binary output files from g++.
* class/scool_ast/inheritance_003.aterm: New.
* class/c++_ast/inheritance_003.aterm: New.
* class/c++_ast/inheritance_004.aterm: New.
* class/c++_ast/static_function_001.aterm: New.
* class/c++_ast/static_function_002.aterm: New.
* class/c++_build/inheritance_003.g++: New.
* class/c++_build/inheritance_004.g++: New.
* class/c++_build/static_function_001.g++: New.
* class/c++_build/static_function_002.g++: New.
* class/c++_src/inheritance_003.cc: New.
* class/c++_src/inheritance_004.cc: New.
* class/c++_src/static_function_001.cc: New.
* class/c++_src/static_function_002.cc: New.
* class/scool_ast/declaration_001.aterm,
* class/scool_ast/declaration_002.aterm,
* class/scool_ast/empty.aterm,
* class/scool_ast/empty_accessblocks.aterm,
* class/scool_ast/empty_private.aterm,
* class/scool_ast/empty_protected.aterm,
* class/scool_ast/empty_public.aterm,
* class/scool_ast/final_001.aterm,
* class/scool_ast/inheritance_001.aterm,
* class/scool_ast/inheritance_002.aterm,
* class/scool_ast/inheritance_004.aterm,
* class/scool_ast/member_001.aterm,
* class/scool_ast/member_002.aterm,
* class/scool_ast/method_001.aterm,
* class/scool_ast/method_002.aterm,
* class/scool_ast/method_003.aterm,
* class/scool_ast/method_004.aterm,
* class/scool_ast/method_005.aterm,
* class/scool_ast/mutable_1.aterm,
* class/scool_ast/static_function_001.aterm,
* class/scool_ast/static_function_002.aterm,
* class/scool_ast/static_function_003.aterm,
* class/scool_src/final_001.scl,
* class/scool_src/inheritance_002.scl,
* class/scool_src/inheritance_003.scl,
* function/scool_ast/declaration_003.aterm,
* function/scool_ast/declaration_004.aterm,
* function/scool_src/declaration_003.scl,
* function/scool_src/declaration_004.scl: Update.
---
class/c++_ast/inheritance_003.aterm | 1 +
class/c++_ast/inheritance_004.aterm | 1 +
class/c++_ast/static_function_001.aterm | 1 +
class/c++_ast/static_function_002.aterm | 1 +
class/c++_src/inheritance_003.cc | 8 ++++++++
class/c++_src/inheritance_004.cc | 8 ++++++++
class/c++_src/static_function_001.cc | 4 ++++
class/c++_src/static_function_002.cc | 4 ++++
class/scool_ast/declaration_001.aterm | 2 +-
class/scool_ast/declaration_002.aterm | 2 +-
class/scool_ast/empty.aterm | 2 +-
class/scool_ast/empty_accessblocks.aterm | 2 +-
class/scool_ast/empty_private.aterm | 2 +-
class/scool_ast/empty_protected.aterm | 2 +-
class/scool_ast/empty_public.aterm | 2 +-
class/scool_ast/final_001.aterm | 2 +-
class/scool_ast/inheritance_001.aterm | 2 +-
class/scool_ast/inheritance_002.aterm | 2 +-
class/scool_ast/inheritance_003.aterm | 1 +
class/scool_ast/inheritance_004.aterm | 2 +-
class/scool_ast/member_001.aterm | 2 +-
class/scool_ast/member_002.aterm | 2 +-
class/scool_ast/method_001.aterm | 2 +-
class/scool_ast/method_002.aterm | 2 +-
class/scool_ast/method_003.aterm | 2 +-
class/scool_ast/method_004.aterm | 2 +-
class/scool_ast/method_005.aterm | 2 +-
class/scool_ast/mutable_1.aterm | 2 +-
class/scool_ast/static_function_001.aterm | 2 +-
class/scool_ast/static_function_002.aterm | 2 +-
class/scool_ast/static_function_003.aterm | 2 +-
class/scool_src/final_001.scl | 2 +-
class/scool_src/inheritance_002.scl | 2 +-
class/scool_src/inheritance_003.scl | 2 +-
config | 2 +-
function/scool_ast/declaration_003.aterm | 2 +-
function/scool_ast/declaration_004.aterm | 2 +-
function/scool_src/declaration_003.scl | 2 +-
function/scool_src/declaration_004.scl | 2 +-
39 files changed, 59 insertions(+), 30 deletions(-)
Index: branches/scool-ng/tests/class/c++_ast/inheritance_003.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/inheritance_003.aterm (revision 0)
+++ branches/scool-ng/tests/class/c++_ast/inheritance_003.aterm (revision 124)
@@ -0,0 +1 @@
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Animal"),[],[]),CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Mammal"),[("public",CxxType(CxxId("Animal"),[CxxId("Exact")]))],[])])
Index: branches/scool-ng/tests/class/c++_ast/inheritance_004.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/inheritance_004.aterm (revision 0)
+++ branches/scool-ng/tests/class/c++_ast/inheritance_004.aterm (revision 124)
@@ -0,0 +1 @@
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact"),(CxxType("int"),CxxId("I"))],CxxId("Foo"),[],[]),CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Cat"),[("public",CxxType(CxxId("Foo"),[CxxId("Exact"),CxxInt("42")]))],[])])
Index: branches/scool-ng/tests/class/c++_ast/static_function_001.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/static_function_001.aterm (revision 0)
+++ branches/scool-ng/tests/class/c++_ast/static_function_001.aterm (revision 124)
@@ -0,0 +1 @@
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact"),(CxxType("typename"),CxxId("T"))],CxxId("A"),[],[])])
Index: branches/scool-ng/tests/class/c++_ast/static_function_002.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/static_function_002.aterm (revision 0)
+++ branches/scool-ng/tests/class/c++_ast/static_function_002.aterm (revision 124)
@@ -0,0 +1 @@
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact"),(CxxType("typename"),CxxId("T")),(CxxType("bool"),CxxId("B"))],CxxId("A"),[],[])])
Index: branches/scool-ng/tests/class/c++_src/inheritance_003.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/inheritance_003.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/inheritance_003.cc (revision 124)
@@ -0,0 +1,8 @@
+template < typename Exact >
+class Animal
+{
+};
+template < typename Exact >
+class Mammal : public Animal< Exact >
+{
+};
Index: branches/scool-ng/tests/class/c++_src/inheritance_004.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/inheritance_004.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/inheritance_004.cc (revision 124)
@@ -0,0 +1,8 @@
+template < typename Exact, int I >
+class Foo
+{
+};
+template < typename Exact >
+class Cat : public Foo< Exact, 42 >
+{
+};
Index: branches/scool-ng/tests/class/c++_src/static_function_001.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/static_function_001.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/static_function_001.cc (revision 124)
@@ -0,0 +1,4 @@
+template < typename Exact, typename T >
+class A
+{
+};
Index: branches/scool-ng/tests/class/c++_src/static_function_002.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/static_function_002.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/static_function_002.cc (revision 124)
@@ -0,0 +1,4 @@
+template < typename Exact, typename T, bool B >
+class A
+{
+};
Index: branches/scool-ng/tests/class/scool_ast/inheritance_001.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/inheritance_001.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/inheritance_001.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Bar"),None,ClassBlock([])),ClassDefinition(None,Identifier("Foo"),Some(ClassWhereClause([Inherits("Foo",SimpleType("Bar"))])),ClassBlock([]))])
+Program([ClassDefinition(Identifier("Bar"),None,None,ClassBlock([])),ClassDefinition(Identifier("Foo"),None,Some(ClassWhereClause([Inherits("Foo",SimpleType("Bar"))])),ClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/final_001.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/final_001.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/final_001.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(Some("final"),Identifier("Student"),None,ClassBlock([]))])
+Program([ClassDefinition(Identifier("Student"),Some("final"),None,ClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/mutable_1.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/mutable_1.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/mutable_1.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("foo"),None,ClassBlock([AccessBlock(Public,[FunctionDefinition(Some("mutable"),Identifier("f"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(Assign(Identifier("x"),Integer("42")))])),SimpleDeclaration(Some("var"),Identifier("x"),SimpleType("int"),None)])]))])
+Program([ClassDefinition(Identifier("foo"),None,None,ClassBlock([AccessBlock(Public,[FunctionDefinition(Some("mutable"),Identifier("f"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(Assign(Identifier("x"),Integer("42")))])),SimpleDeclaration(Some("var"),Identifier("x"),SimpleType("int"),None)])]))])
Index: branches/scool-ng/tests/class/scool_ast/inheritance_002.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/inheritance_002.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/inheritance_002.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Animal"),None,ClassBlock([])),ClassDefinition(None,Identifier("Mammal"),Some(ClassWhereClause([Inherits("Mammal",SimpleType("Animal"))])),ClassBlock([])),ClassDefinition(Some("final"),Identifier("Monkey"),Some(ClassWhereClause([Inherits("Monkey",SimpleType("Mammal"))])),ClassBlock([]))])
+Program([ClassDefinition(Identifier("Animal"),None,None,ClassBlock([])),ClassDefinition(Identifier("Mammal"),None,Some(ClassWhereClause([Inherits("Mammal",SimpleType("Animal"))])),ClassBlock([])),ClassDefinition(Identifier("Monkey"),Some("final"),Some(ClassWhereClause([Inherits("Monkey",SimpleType("Mammal"))])),ClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/inheritance_003.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/inheritance_003.aterm (revision 0)
+++ branches/scool-ng/tests/class/scool_ast/inheritance_003.aterm (revision 124)
@@ -0,0 +1 @@
+Program([ClassDefinition(Identifier("Animal"),Some("abstract"),None,ClassBlock([])),ClassDefinition(Identifier("Mammal"),None,Some(ClassWhereClause([Inherits("Mammal",SimpleType("Animal"))])),ClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/inheritance_004.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/inheritance_004.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/inheritance_004.aterm (revision 124)
@@ -1 +1 @@
-Program([StaticClassFunction(None,Identifier("Foo"),ParametersDeclaration([TypedId(Identifier("I"),SimpleType("int"))]),StaticClassBlock([])),ClassDefinition(None,Identifier("Cat"),Some(ClassWhereClause([Inherits("Cat",StaticFunctionCall(Identifier("Foo"),Parameters([Integer("42")])))])),ClassBlock([]))])
+Program([StaticClassFunction(Identifier("Foo"),ParametersDeclaration([TypedId(Identifier("I"),SimpleType("int"))]),None,StaticClassBlock([])),ClassDefinition(Identifier("Cat"),None,Some(ClassWhereClause([Inherits("Cat",StaticFunctionCall(Identifier("Foo"),Parameters([Integer("42")])))])),ClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/static_function_001.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/static_function_001.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/static_function_001.aterm (revision 124)
@@ -1 +1 @@
-Program([StaticClassFunction(None,Identifier("A"),ParametersDeclaration([TypedId(Identifier("T"),"type")]),StaticClassBlock([]))])
+Program([StaticClassFunction(Identifier("A"),ParametersDeclaration([TypedId(Identifier("T"),"type")]),None,StaticClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/empty_accessblocks.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/empty_accessblocks.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/empty_accessblocks.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([AccessBlock(Public,[]),AccessBlock(Protected,[]),AccessBlock(Private,[])]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([AccessBlock(Public,[]),AccessBlock(Protected,[]),AccessBlock(Private,[])]))])
Index: branches/scool-ng/tests/class/scool_ast/static_function_002.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/static_function_002.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/static_function_002.aterm (revision 124)
@@ -1 +1 @@
-Program([StaticClassFunction(None,Identifier("A"),ParametersDeclaration([TypedId(Identifier("T"),"type"),TypedId(Identifier("B"),SimpleType("bool"))]),StaticClassBlock([]))])
+Program([StaticClassFunction(Identifier("A"),ParametersDeclaration([TypedId(Identifier("T"),"type"),TypedId(Identifier("B"),SimpleType("bool"))]),None,StaticClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/static_function_003.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/static_function_003.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/static_function_003.aterm (revision 124)
@@ -1 +1 @@
-Program([StaticClassFunction(None,Identifier("A"),ParametersDeclaration([SimpleType("int")]),StaticClassBlock([]))])
+Program([StaticClassFunction(Identifier("A"),ParametersDeclaration([SimpleType("int")]),None,StaticClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/member_001.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/member_001.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/member_001.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Point1d"),None,ClassBlock([AccessBlock(Public,[SimpleDeclaration(Some("var"),Identifier("x"),SimpleType("int"),None)])]))])
+Program([ClassDefinition(Identifier("Point1d"),None,None,ClassBlock([AccessBlock(Public,[SimpleDeclaration(Some("var"),Identifier("x"),SimpleType("int"),None)])]))])
Index: branches/scool-ng/tests/class/scool_ast/member_002.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/member_002.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/member_002.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Point2d"),None,ClassBlock([AccessBlock(Public,[SimpleDeclaration(Some("var"),Identifier("x"),SimpleType("int"),None),SimpleDeclaration(Some("var"),Identifier("y"),SimpleType("int"),None)])]))])
+Program([ClassDefinition(Identifier("Point2d"),None,None,ClassBlock([AccessBlock(Public,[SimpleDeclaration(Some("var"),Identifier("x"),SimpleType("int"),None),SimpleDeclaration(Some("var"),Identifier("y"),SimpleType("int"),None)])]))])
Index: branches/scool-ng/tests/class/scool_ast/empty_private.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/empty_private.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/empty_private.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([AccessBlock(Private,[])]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([AccessBlock(Private,[])]))])
Index: branches/scool-ng/tests/class/scool_ast/empty_public.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/empty_public.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/empty_public.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([AccessBlock(Public,[])]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([AccessBlock(Public,[])]))])
Index: branches/scool-ng/tests/class/scool_ast/empty.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/empty.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/empty.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/method_001.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/method_001.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/method_001.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("42"))]))])]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("42"))]))])]))])
Index: branches/scool-ng/tests/class/scool_ast/method_002.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/method_002.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/method_002.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock(Integer("42")))])]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock(Integer("42")))])]))])
Index: branches/scool-ng/tests/class/scool_ast/method_003.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/method_003.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/method_003.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock(Integer("42"))),FunctionDefinition(None,Identifier("another_test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock(Integer("51")))])]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock(Integer("42"))),FunctionDefinition(None,Identifier("another_test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock(Integer("51")))])]))])
Index: branches/scool-ng/tests/class/scool_ast/method_004.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/method_004.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/method_004.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("42"))])),FunctionDefinition(None,Identifier("another_test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("51"))]))])]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("42"))])),FunctionDefinition(None,Identifier("another_test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("51"))]))])]))])
Index: branches/scool-ng/tests/class/scool_ast/method_005.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/method_005.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/method_005.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("42"))]))]),AccessBlock(Private,[FunctionDefinition(None,Identifier("another_test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("51"))]))])]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([AccessBlock(Public,[FunctionDefinition(None,Identifier("test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("42"))]))]),AccessBlock(Private,[FunctionDefinition(None,Identifier("another_test"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("int")),FunctionBlock([ReturnStatement(Integer("51"))]))])]))])
Index: branches/scool-ng/tests/class/scool_ast/declaration_001.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/declaration_001.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/declaration_001.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDeclaration(None,Identifier("Foo"),None)])
+Program([ClassDeclaration(Identifier("Foo"),None,None)])
Index: branches/scool-ng/tests/class/scool_ast/declaration_002.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/declaration_002.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/declaration_002.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDeclaration(None,Identifier("Bar"),None),ClassDeclaration(None,Identifier("Foo"),Some(ClassWhereClause([Inherits("Foo",SimpleType("Bar"))])))])
+Program([ClassDeclaration(Identifier("Bar"),None,None),ClassDeclaration(Identifier("Foo"),None,Some(ClassWhereClause([Inherits("Foo",SimpleType("Bar"))])))])
Index: branches/scool-ng/tests/class/scool_ast/empty_protected.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/empty_protected.aterm (revision 123)
+++ branches/scool-ng/tests/class/scool_ast/empty_protected.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Foo"),None,ClassBlock([AccessBlock(Protected,[])]))])
+Program([ClassDefinition(Identifier("Foo"),None,None,ClassBlock([AccessBlock(Protected,[])]))])
Index: branches/scool-ng/tests/class/scool_src/final_001.scl
===================================================================
--- branches/scool-ng/tests/class/scool_src/final_001.scl (revision 123)
+++ branches/scool-ng/tests/class/scool_src/final_001.scl (revision 124)
@@ -1,3 +1,3 @@
-final Student : class =
+Student : final class =
{
}
Index: branches/scool-ng/tests/class/scool_src/inheritance_002.scl
===================================================================
--- branches/scool-ng/tests/class/scool_src/inheritance_002.scl (revision 123)
+++ branches/scool-ng/tests/class/scool_src/inheritance_002.scl (revision 124)
@@ -8,7 +8,7 @@
}
-final Monkey : class where Monkey -> Mammal =
+Monkey : final class where Monkey -> Mammal =
{
}
Index: branches/scool-ng/tests/class/scool_src/inheritance_003.scl
===================================================================
--- branches/scool-ng/tests/class/scool_src/inheritance_003.scl (revision 123)
+++ branches/scool-ng/tests/class/scool_src/inheritance_003.scl (revision 124)
@@ -1,4 +1,4 @@
-abstract Animal: class =
+Animal: abstract class =
{
}
Index: branches/scool-ng/tests/class/c++_build/inheritance_003.g++
===================================================================
Index: branches/scool-ng/tests/class/c++_build/inheritance_004.g++
===================================================================
Index: branches/scool-ng/tests/class/c++_build/static_function_001.g++
===================================================================
Index: branches/scool-ng/tests/class/c++_build/static_function_002.g++
===================================================================
Index: branches/scool-ng/tests/config
===================================================================
--- branches/scool-ng/tests/config (revision 123)
+++ branches/scool-ng/tests/config (revision 124)
@@ -48,7 +48,7 @@
test_4 ()
{
desc="Compilation of generated code"
- cmd='g++ -W -Wall -c $input_file'
+ cmd='g++ -W -Wall -o /dev/null -c $input_file'
cmp='diff -EwbB -u $ref $output'
print_input_cmd='cat $input_file'
print_output_cmd='cat $input_file'
Index: branches/scool-ng/tests/function/scool_ast/declaration_004.aterm
===================================================================
--- branches/scool-ng/tests/function/scool_ast/declaration_004.aterm (revision 123)
+++ branches/scool-ng/tests/function/scool_ast/declaration_004.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDeclaration(Some("final"),Identifier("toto"),None),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void"))),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("arg1"),SimpleType("int"))]),SimpleType("float"))),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("arg1"),SimpleType("toto")),TypedId(Identifier("arg2"),ReferenceType(SimpleType("double")))]),SimpleType("char")))])
+Program([ClassDeclaration(Identifier("toto"),Some("final"),None),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void"))),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("arg1"),SimpleType("int"))]),SimpleType("float"))),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("arg1"),SimpleType("toto")),TypedId(Identifier("arg2"),ReferenceType(SimpleType("double")))]),SimpleType("char")))])
Index: branches/scool-ng/tests/function/scool_ast/declaration_003.aterm
===================================================================
--- branches/scool-ng/tests/function/scool_ast/declaration_003.aterm (revision 123)
+++ branches/scool-ng/tests/function/scool_ast/declaration_003.aterm (revision 124)
@@ -1 +1 @@
-Program([ClassDeclaration(Some("final"),Identifier("bar"),None),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("a"),SimpleType("int")),TypedId(Identifier("b"),SimpleType("bar"))]),SimpleType("void")))])
+Program([ClassDeclaration(Identifier("bar"),Some("final"),None),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("a"),SimpleType("int")),TypedId(Identifier("b"),SimpleType("bar"))]),SimpleType("void")))])
Index: branches/scool-ng/tests/function/scool_src/declaration_003.scl
===================================================================
--- branches/scool-ng/tests/function/scool_src/declaration_003.scl (revision 123)
+++ branches/scool-ng/tests/function/scool_src/declaration_003.scl (revision 124)
@@ -1,3 +1,3 @@
-final bar : class;
+bar : final class;
foo : (a : int, b : bar) -> void;
Index: branches/scool-ng/tests/function/scool_src/declaration_004.scl
===================================================================
--- branches/scool-ng/tests/function/scool_src/declaration_004.scl (revision 123)
+++ branches/scool-ng/tests/function/scool_src/declaration_004.scl (revision 124)
@@ -1,4 +1,4 @@
-final toto : class;
+toto : final class;
foo : () -> void;
foo : (arg1 : int) -> float;