URL:
https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2008-09-12 Maxime van Noppen <yabo(a)lrde.epita.fr>
Add tests
* function/c++_ast/declaration_001.aterm: New.
* function/c++_ast/declaration_002.aterm: New.
* function/c++_ast/declaration_003.aterm: New.
* function/scool_ast/static_dynamic_parameters_005.aterm: New.
* function/scool_src/static_dynamic_parameters_005.scl: New.
* variable/c++_ast/declaration_003.aterm: New.
* variable/c++_ast/declaration_004.aterm: New.
* variable/c++_ast/declaration_008.aterm: New.
* variable/c++_ast/mixed_declarations_001.aterm: New.
* variable/scool_ast/declaration_008.aterm: New.
* variable/scool_src/declaration_008.scl: New.
* variable/c++_ast/declaration_001.aterm,
* variable/c++_ast/declaration_007.aterm: Update regarding grammar changes.
function/c++_ast/declaration_001.aterm | 1 +
function/c++_ast/declaration_002.aterm | 1 +
function/c++_ast/declaration_003.aterm | 1 +
function/scool_ast/static_dynamic_parameters_005.aterm | 1 +
function/scool_src/static_dynamic_parameters_005.scl | 1 +
variable/c++_ast/declaration_001.aterm | 2 +-
variable/c++_ast/declaration_003.aterm | 1 +
variable/c++_ast/declaration_004.aterm | 1 +
variable/c++_ast/declaration_007.aterm | 2 +-
variable/c++_ast/declaration_008.aterm | 1 +
variable/c++_ast/mixed_declarations_001.aterm | 1 +
variable/scool_ast/declaration_008.aterm | 1 +
variable/scool_src/declaration_008.scl | 1 +
13 files changed, 13 insertions(+), 2 deletions(-)
Index: branches/scool-ng/tests/function/c++_ast/declaration_001.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_001.aterm (revision 0)
+++ branches/scool-ng/tests/function/c++_ast/declaration_001.aterm (revision 77)
@@ -0,0 +1 @@
+CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),[])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_002.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_002.aterm (revision 0)
+++ branches/scool-ng/tests/function/c++_ast/declaration_002.aterm (revision 77)
@@ -0,0 +1 @@
+CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),[(CxxType("int"),CxxId("a"))])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_003.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_003.aterm (revision 0)
+++ branches/scool-ng/tests/function/c++_ast/declaration_003.aterm (revision 77)
@@ -0,0 +1 @@
+CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),[(CxxType("int"),CxxId("a")),(CxxConstType(CxxRefType(CxxType("bar"))),CxxId("b"))])])
Index: branches/scool-ng/tests/function/scool_ast/static_dynamic_parameters_005.aterm
===================================================================
---
branches/scool-ng/tests/function/scool_ast/static_dynamic_parameters_005.aterm (revision
0)
+++
branches/scool-ng/tests/function/scool_ast/static_dynamic_parameters_005.aterm (revision
77)
@@ -0,0 +1 @@
+Program([FunctionDefinition(None,Identifier("f"),FunctionType(Some(ParametersDeclaration([TypedId(Identifier("T"),"type"),TypedId(Identifier("U"),"type")])),ArgumentsDeclaration([TypedId(Identifier("a"),SimpleType("T")),TypedId(Identifier("b"),SimpleType("U"))]),SimpleType("T")),Identifier("a"))])
Index: branches/scool-ng/tests/function/scool_src/static_dynamic_parameters_005.scl
===================================================================
--- branches/scool-ng/tests/function/scool_src/static_dynamic_parameters_005.scl (revision
0)
+++ branches/scool-ng/tests/function/scool_src/static_dynamic_parameters_005.scl (revision
77)
@@ -0,0 +1 @@
+f : [T : type, U : type] (a : T, b : U) -> T => a;
Index: branches/scool-ng/tests/variable/c++_ast/declaration_004.aterm
===================================================================
--- branches/scool-ng/tests/variable/c++_ast/declaration_004.aterm (revision 0)
+++ branches/scool-ng/tests/variable/c++_ast/declaration_004.aterm (revision 77)
@@ -0,0 +1 @@
+CxxProgram([CxxDecl(CxxType("int"),CxxId("i"),CxxInt("42"))])
Index: branches/scool-ng/tests/variable/c++_ast/declaration_007.aterm
===================================================================
--- branches/scool-ng/tests/variable/c++_ast/declaration_007.aterm (revision 76)
+++ branches/scool-ng/tests/variable/c++_ast/declaration_007.aterm (revision 77)
@@ -1 +1 @@
-CxxProgram([CxxDecl(CxxConstType(CxxType("int")),Identifier("i"))])
+CxxProgram([CxxDecl(CxxConstType(CxxType("int")),CxxId("i"))])
Index: branches/scool-ng/tests/variable/c++_ast/declaration_008.aterm
===================================================================
--- branches/scool-ng/tests/variable/c++_ast/declaration_008.aterm (revision 0)
+++ branches/scool-ng/tests/variable/c++_ast/declaration_008.aterm (revision 77)
@@ -0,0 +1 @@
+CxxProgram([CxxDecl(CxxType("int"),CxxId("i"),CxxId("j"))])
Index: branches/scool-ng/tests/variable/c++_ast/mixed_declarations_001.aterm
===================================================================
--- branches/scool-ng/tests/variable/c++_ast/mixed_declarations_001.aterm (revision 0)
+++ branches/scool-ng/tests/variable/c++_ast/mixed_declarations_001.aterm (revision 77)
@@ -0,0 +1 @@
+CxxProgram([CxxDecl(CxxConstType(CxxType("int")),CxxId("answer"),CxxInt("42")),CxxDecl(CxxType("int"),CxxId("i")),CxxDecl(CxxType("int"),CxxId("j"),CxxId("i"))])
Index: branches/scool-ng/tests/variable/c++_ast/declaration_001.aterm
===================================================================
--- branches/scool-ng/tests/variable/c++_ast/declaration_001.aterm (revision 76)
+++ branches/scool-ng/tests/variable/c++_ast/declaration_001.aterm (revision 77)
@@ -1 +1 @@
-CxxProgram([CxxDecl(CxxConstType(CxxType("int")),Identifier("i"))])
+CxxProgram([CxxDecl(CxxConstType(CxxType("int")),CxxId("i"))])
Index: branches/scool-ng/tests/variable/c++_ast/declaration_003.aterm
===================================================================
--- branches/scool-ng/tests/variable/c++_ast/declaration_003.aterm (revision 0)
+++ branches/scool-ng/tests/variable/c++_ast/declaration_003.aterm (revision 77)
@@ -0,0 +1 @@
+CxxProgram([CxxDecl(CxxType("int"),CxxId("i"))])
Index: branches/scool-ng/tests/variable/scool_ast/declaration_008.aterm
===================================================================
--- branches/scool-ng/tests/variable/scool_ast/declaration_008.aterm (revision 0)
+++ branches/scool-ng/tests/variable/scool_ast/declaration_008.aterm (revision 77)
@@ -0,0 +1 @@
+Program([SimpleDeclaration(Some("var"),Identifier("i"),SimpleType("int"),Some(Initialiser(Identifier("j"))))])
Index: branches/scool-ng/tests/variable/scool_src/declaration_008.scl
===================================================================
--- branches/scool-ng/tests/variable/scool_src/declaration_008.scl (revision 0)
+++ branches/scool-ng/tests/variable/scool_src/declaration_008.scl (revision 77)
@@ -0,0 +1 @@
+var i : int = j;
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ \_____)