# HG changeset patch # User Louis Opter # Date 1350630025 -7200 # Node ID 5eb746474f0f562eb760b0a0830a7fffd0373086 # Parent 9f06d7fb2542b7a4cdb80aa9d744f0738425c627 Add a test for the pointer to Rathaxes type/variable bug diff -r 9f06d7fb2542 -r 5eb746474f0f rathaxes_add_a_test_to_reproduce_the_pointer_to_rathaxes_bug.patch --- /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 ++{ ++} diff -r 9f06d7fb2542 -r 5eb746474f0f series --- 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