changeset 92:5eb746474f0f

Add a test for the pointer to Rathaxes type/variable bug
author Louis Opter <louis@lse.epita.fr>
date Fri, 19 Oct 2012 09:00:25 +0200
parents 9f06d7fb2542
children 2cc8fda4c4e3
files rathaxes_add_a_test_to_reproduce_the_pointer_to_rathaxes_bug.patch series
diffstat 2 files changed, 94 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rathaxes_add_a_test_to_reproduce_the_pointer_to_rathaxes_bug.patch	Fri Oct 19 09:00:25 2012 +0200
@@ -0,0 +1,93 @@
+# HG changeset patch
+# Parent 7eec45c5cc587ee8b1839b38e9d9ec652856c45a
+rathaxes: add a test for the pointer to Rathaxes type bug
+
+
+diff --git a/rathaxes/compiler/tests/CMakeLists.txt b/rathaxes/compiler/tests/CMakeLists.txt
+--- a/rathaxes/compiler/tests/CMakeLists.txt
++++ b/rathaxes/compiler/tests/CMakeLists.txt
+@@ -43,3 +43,5 @@
+ 
+ # Tests for the typing system (should not do anymore than parsing/checking typing)
+ ADD_SUBDIRECTORY(typing)
++
++ADD_SUBDIRECTORY(pointer_to_rathaxes_type)
+diff --git a/rathaxes/compiler/tests/pointer_to_rathaxes_type/CMakeLists.txt b/rathaxes/compiler/tests/pointer_to_rathaxes_type/CMakeLists.txt
+new file mode 100644
+--- /dev/null
++++ b/rathaxes/compiler/tests/pointer_to_rathaxes_type/CMakeLists.txt
+@@ -0,0 +1,3 @@
++ADD_RATHAXES_SOURCES(test_pointer_to_rathaxes_type pointer_to_rathaxes_type.rtx
++                     RTI pointer_to_rathaxes_type.rti
++                     BLT pointer_to_rathaxes_type.blt)
+diff --git a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.blt b/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.blt
+new file mode 100644
+--- /dev/null
++++ b/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.blt
+@@ -0,0 +1,32 @@
++with Test
++{
++    ${pointcut Test::code()};
++
++    template type   Test::Test()
++    {
++        chunk   ::decl()
++        {
++            int;
++        }
++
++        map
++        {
++        }
++    }
++
++    template sequence   Test::entry_point(Test::Test)
++    {
++        chunk   code()
++        {
++            int
++            main(void)
++            {
++                ${Test::Test} *p;
++
++                ${pointcut ::IMPLEMENTATION(local.p)};
++
++                return 0;
++            }
++        }
++    }
++}
+diff --git a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rti b/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rti
+new file mode 100644
+--- /dev/null
++++ b/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rti
+@@ -0,0 +1,14 @@
++interface Test
++{
++    provided pointcut   code();
++
++    provided type   Test
++    {
++        chunk   ::decl();
++    }
++
++    required sequence   entry_point(Test::Test)
++    {
++        provided chunk  code();
++    }
++}
+diff --git a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rtx b/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rtx
+new file mode 100644
+--- /dev/null
++++ b/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rtx
+@@ -0,0 +1,10 @@
++device Test use Test
++{
++    Test::entry_point(Test::Test t)
++    {
++    }
++}
++
++configuration
++{
++}
--- a/series	Mon Oct 15 06:18:35 2012 +0200
+++ b/series	Fri Oct 19 09:00:25 2012 +0200
@@ -0,0 +1,1 @@
+rathaxes_add_a_test_to_reproduce_the_pointer_to_rathaxes_bug.patch