URL:
https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2008-10-02 Maxime van Noppen <yabo(a)lrde.epita.fr>
Add tests on classes
* class/scool_ast/inheritance_001.aterm,
* class/scool_ast/inheritance_002.aterm: Update regarding grammar
* changes.
* class/scool_ast/inheritance_004.aterm: New.
* class/scool_src/inheritance_004.scl: New.
scool_ast/inheritance_001.aterm | 2 +-
scool_ast/inheritance_002.aterm | 2 +-
scool_ast/inheritance_004.aterm | 1 +
scool_src/inheritance_004.scl | 3 +++
4 files changed, 6 insertions(+), 2 deletions(-)
Index: branches/scool-ng/tests/class/scool_ast/inheritance_001.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/inheritance_001.aterm (revision 103)
+++ branches/scool-ng/tests/class/scool_ast/inheritance_001.aterm (revision 104)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Bar"),None,ClassBlock([])),ClassDefinition(None,Identifier("Foo"),Some(ClassWhereClause([Inherits("Foo","Bar")])),ClassBlock([]))])
+Program([ClassDefinition(None,Identifier("Bar"),None,ClassBlock([])),ClassDefinition(None,Identifier("Foo"),Some(ClassWhereClause([Inherits("Foo",SimpleType("Bar"))])),ClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_ast/inheritance_002.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/inheritance_002.aterm (revision 103)
+++ branches/scool-ng/tests/class/scool_ast/inheritance_002.aterm (revision 104)
@@ -1 +1 @@
-Program([ClassDefinition(None,Identifier("Animal"),None,ClassBlock([])),ClassDefinition(None,Identifier("Mammal"),Some(ClassWhereClause([Inherits("Mammal","Animal")])),ClassBlock([])),ClassDefinition(Some("final"),Identifier("Monkey"),Some(ClassWhereClause([Inherits("Monkey","Mammal")])),ClassBlock([]))])
+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([]))])
Index: branches/scool-ng/tests/class/scool_ast/inheritance_004.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/inheritance_004.aterm (revision 0)
+++ branches/scool-ng/tests/class/scool_ast/inheritance_004.aterm (revision 104)
@@ -0,0 +1 @@
+Program([ClassDefinition(None,Identifier("Cat"),Some(ClassWhereClause([Inherits("Cat",StaticFunctionCall(Identifier("Foo"),Parameters([Integer("42")])))])),ClassBlock([]))])
Index: branches/scool-ng/tests/class/scool_src/inheritance_004.scl
===================================================================
--- branches/scool-ng/tests/class/scool_src/inheritance_004.scl (revision 0)
+++ branches/scool-ng/tests/class/scool_src/inheritance_004.scl (revision 104)
@@ -0,0 +1,3 @@
+Cat : class where Cat -> Foo[42] =
+{
+}
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ \_____)