URL:
https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2008-10-08 Maxime van Noppen <yabo(a)lrde.epita.fr>
Add reference files for tests on inheritance
* class/c++_ast/inheritance_001.aterm,
* class/c++_ast/inheritance_002.aterm,
* class/c++_ast/inheritance_004.aterm: Parents must be in a list.
* class/c++_src/inheritance_001.cc: New.
* class/c++_src/inheritance_002.cc: New.
* class/c++_src/inheritance_004.cc: New.
* class/scool_src/inheritance_003.scl: Fixed (funny) typo.
c++_ast/inheritance_001.aterm | 2 +-
c++_ast/inheritance_002.aterm | 2 +-
c++_ast/inheritance_004.aterm | 2 +-
c++_src/inheritance_001.cc | 8 ++++++++
c++_src/inheritance_002.cc | 11 +++++++++++
c++_src/inheritance_004.cc | 4 ++++
scool_src/inheritance_003.scl | 2 +-
7 files changed, 27 insertions(+), 4 deletions(-)
Index: branches/scool-ng/tests/class/c++_ast/inheritance_001.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/inheritance_001.aterm (revision 109)
+++ branches/scool-ng/tests/class/c++_ast/inheritance_001.aterm (revision 110)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Bar"),[],[]),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++_ast/inheritance_002.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/inheritance_002.aterm (revision 109)
+++ branches/scool-ng/tests/class/c++_ast/inheritance_002.aterm (revision 110)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Animal"),[],[]),CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Mammal"),("public",CxxType(CxxId("Animal"),[CxxId("Exact")])),[]),CxxClassDecl([],CxxId("Monkey"),("public",CxxType(CxxId("Mammal"),[CxxId("Monkey")])),[])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Animal"),[],[]),CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Mammal"),[("public",CxxType(CxxId("Animal"),[CxxId("Exact")]))],[]),CxxClassDecl([],CxxId("Monkey"),[("public",CxxType(CxxId("Mammal"),[CxxId("Monkey")]))],[])])
Index: branches/scool-ng/tests/class/c++_ast/inheritance_004.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/inheritance_004.aterm (revision 109)
+++ branches/scool-ng/tests/class/c++_ast/inheritance_004.aterm (revision 110)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Cat"),("public",CxxType(CxxId("Foo"),[CxxId("Exact"),CxxInt("42")])),[])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Cat"),[("public",CxxType(CxxId("Foo"),[CxxId("Exact"),CxxInt("42")]))],[])])
Index: branches/scool-ng/tests/class/c++_src/inheritance_001.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/inheritance_001.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/inheritance_001.cc (revision 110)
@@ -0,0 +1,8 @@
+template < typename Exact >
+class Bar
+{
+};
+template < typename Exact >
+class Foo : public Bar< Exact >
+{
+};
Index: branches/scool-ng/tests/class/c++_src/inheritance_002.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/inheritance_002.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/inheritance_002.cc (revision 110)
@@ -0,0 +1,11 @@
+template < typename Exact >
+class Animal
+{
+};
+template < typename Exact >
+class Mammal : public Animal< Exact >
+{
+};
+class Monkey : public Mammal< Monkey >
+{
+};
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 110)
@@ -0,0 +1,4 @@
+template < typename Exact >
+class Cat : public Foo< Exact, 42 >
+{
+};
Index: branches/scool-ng/tests/class/scool_src/inheritance_003.scl
===================================================================
--- branches/scool-ng/tests/class/scool_src/inheritance_003.scl (revision 109)
+++ branches/scool-ng/tests/class/scool_src/inheritance_003.scl (revision 110)
@@ -3,7 +3,7 @@
}
-Mammal : class where Mamman -> Animal =
+Mammal : class where Mammal -> Animal =
{
}
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ \_____)