Mercurial > archived > louis > epitech > mq > rathaxes
changeset 94:c908de343118
Add a patch to reproduce my problem on single file Rathaxes sources
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Mon, 22 Oct 2012 01:27:53 +0200 |
parents | 2cc8fda4c4e3 |
children | 4e7107e284de |
files | rathaxes_use_single_file_language_tests.patch series |
diffstat | 2 files changed, 145 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rathaxes_use_single_file_language_tests.patch Mon Oct 22 01:27:53 2012 +0200 @@ -0,0 +1,144 @@ +# HG changeset patch +# Parent ffa060c7b01bd1158337a7115f13ac9bf5d7df50 +rathaxes: convert the test about pointers to Rathaxes types to a single file + +And move it to a more generic "language" directory under tests. + +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 +@@ -44,4 +44,4 @@ + # Tests for the typing system (should not do anymore than parsing/checking typing) + ADD_SUBDIRECTORY(typing) + +-ADD_SUBDIRECTORY(pointer_to_rathaxes_type) ++ADD_SUBDIRECTORY(language) +diff --git a/rathaxes/compiler/tests/pointer_to_rathaxes_type/CMakeLists.txt b/rathaxes/compiler/tests/language/CMakeLists.txt +rename from rathaxes/compiler/tests/pointer_to_rathaxes_type/CMakeLists.txt +rename to rathaxes/compiler/tests/language/CMakeLists.txt +--- a/rathaxes/compiler/tests/pointer_to_rathaxes_type/CMakeLists.txt ++++ b/rathaxes/compiler/tests/language/CMakeLists.txt +@@ -1,3 +1,1 @@ +-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) ++ADD_RATHAXES_SOURCES(test_pointer_to_rathaxes_type pointer_to_rathaxes_type.rtx) +diff --git a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rtx b/rathaxes/compiler/tests/language/pointer_to_rathaxes_type.rtx +rename from rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rtx +rename to rathaxes/compiler/tests/language/pointer_to_rathaxes_type.rtx +--- a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rtx ++++ b/rathaxes/compiler/tests/language/pointer_to_rathaxes_type.rtx +@@ -1,3 +1,57 @@ ++/* Interfaces */ ++ ++interface Test ++{ ++ provided pointcut code(); ++ ++ provided type Test ++ { ++ chunk ::decl(); ++ } ++ ++ required sequence entry_point(Test::Test) ++ { ++ provided chunk code(); ++ } ++} ++ ++/* Templates */ ++ ++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; ++ } ++ } ++ } ++} ++ ++/* Description */ ++ + device Test use Test + { + Test::entry_point(Test::Test t) +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 +deleted file mode 100644 +--- a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.blt ++++ /dev/null +@@ -1,32 +0,0 @@ +-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 +deleted file mode 100644 +--- a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rti ++++ /dev/null +@@ -1,14 +0,0 @@ +-interface Test +-{ +- provided pointcut code(); +- +- provided type Test +- { +- chunk ::decl(); +- } +- +- required sequence entry_point(Test::Test) +- { +- provided chunk code(); +- } +-}