comparison rathaxes_use_single_file_language_tests.patch @ 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
children 4e7107e284de
comparison
equal deleted inserted replaced
93:2cc8fda4c4e3 94:c908de343118
1 # HG changeset patch
2 # Parent ffa060c7b01bd1158337a7115f13ac9bf5d7df50
3 rathaxes: convert the test about pointers to Rathaxes types to a single file
4
5 And move it to a more generic "language" directory under tests.
6
7 diff --git a/rathaxes/compiler/tests/CMakeLists.txt b/rathaxes/compiler/tests/CMakeLists.txt
8 --- a/rathaxes/compiler/tests/CMakeLists.txt
9 +++ b/rathaxes/compiler/tests/CMakeLists.txt
10 @@ -44,4 +44,4 @@
11 # Tests for the typing system (should not do anymore than parsing/checking typing)
12 ADD_SUBDIRECTORY(typing)
13
14 -ADD_SUBDIRECTORY(pointer_to_rathaxes_type)
15 +ADD_SUBDIRECTORY(language)
16 diff --git a/rathaxes/compiler/tests/pointer_to_rathaxes_type/CMakeLists.txt b/rathaxes/compiler/tests/language/CMakeLists.txt
17 rename from rathaxes/compiler/tests/pointer_to_rathaxes_type/CMakeLists.txt
18 rename to rathaxes/compiler/tests/language/CMakeLists.txt
19 --- a/rathaxes/compiler/tests/pointer_to_rathaxes_type/CMakeLists.txt
20 +++ b/rathaxes/compiler/tests/language/CMakeLists.txt
21 @@ -1,3 +1,1 @@
22 -ADD_RATHAXES_SOURCES(test_pointer_to_rathaxes_type pointer_to_rathaxes_type.rtx
23 - RTI pointer_to_rathaxes_type.rti
24 - BLT pointer_to_rathaxes_type.blt)
25 +ADD_RATHAXES_SOURCES(test_pointer_to_rathaxes_type pointer_to_rathaxes_type.rtx)
26 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
27 rename from rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rtx
28 rename to rathaxes/compiler/tests/language/pointer_to_rathaxes_type.rtx
29 --- a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rtx
30 +++ b/rathaxes/compiler/tests/language/pointer_to_rathaxes_type.rtx
31 @@ -1,3 +1,57 @@
32 +/* Interfaces */
33 +
34 +interface Test
35 +{
36 + provided pointcut code();
37 +
38 + provided type Test
39 + {
40 + chunk ::decl();
41 + }
42 +
43 + required sequence entry_point(Test::Test)
44 + {
45 + provided chunk code();
46 + }
47 +}
48 +
49 +/* Templates */
50 +
51 +with Test
52 +{
53 + ${pointcut Test::code()};
54 +
55 + template type Test::Test()
56 + {
57 + chunk ::decl()
58 + {
59 + int;
60 + }
61 +
62 + map
63 + {
64 + }
65 + }
66 +
67 + template sequence Test::entry_point(Test::Test)
68 + {
69 + chunk code()
70 + {
71 + int
72 + main(void)
73 + {
74 + ${Test::Test} *p;
75 +
76 + ${pointcut ::IMPLEMENTATION(local.p)};
77 +
78 + return 0;
79 + }
80 + }
81 + }
82 +}
83 +
84 +/* Description */
85 +
86 device Test use Test
87 {
88 Test::entry_point(Test::Test t)
89 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
90 deleted file mode 100644
91 --- a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.blt
92 +++ /dev/null
93 @@ -1,32 +0,0 @@
94 -with Test
95 -{
96 - ${pointcut Test::code()};
97 -
98 - template type Test::Test()
99 - {
100 - chunk ::decl()
101 - {
102 - int;
103 - }
104 -
105 - map
106 - {
107 - }
108 - }
109 -
110 - template sequence Test::entry_point(Test::Test)
111 - {
112 - chunk code()
113 - {
114 - int
115 - main(void)
116 - {
117 - ${Test::Test} *p;
118 -
119 - ${pointcut ::IMPLEMENTATION(local.p)};
120 -
121 - return 0;
122 - }
123 - }
124 - }
125 -}
126 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
127 deleted file mode 100644
128 --- a/rathaxes/compiler/tests/pointer_to_rathaxes_type/pointer_to_rathaxes_type.rti
129 +++ /dev/null
130 @@ -1,14 +0,0 @@
131 -interface Test
132 -{
133 - provided pointcut code();
134 -
135 - provided type Test
136 - {
137 - chunk ::decl();
138 - }
139 -
140 - required sequence entry_point(Test::Test)
141 - {
142 - provided chunk code();
143 - }
144 -}