@@ -79,73 +79,73 @@ static void Fail(
7979 }
8080}
8181
82- TEST (FailTest , E1 ) {
82+ TEST (TestCornerCases , E1 ) {
8383 Fail (" expected (" , " def f{} {}" , {}, {});
8484}
85- TEST (FailTest , E2 ) {
85+ TEST (TestCornerCases , E2 ) {
8686 Succeed (" def f(float(1) a) -> (b) { b(i) = a(i) }" , {F (1 )}, {F (1 )});
8787}
8888
8989// free(): invalid next size (fast): 0x000000003b2d6230 ***
90- TEST (FailTest , DISABLED_E4) {
90+ TEST (TestCornerCases , DISABLED_E4) {
9191 Succeed (" def f(float a) -> (b) { b = a }" , {F ()}, {F ()});
9292}
9393
9494// main conflicts with program main in nvcc
95- TEST (FailTest , DISABLED_E3) {
95+ TEST (TestCornerCases , DISABLED_E3) {
9696 Succeed (
9797 " def main(float(1) a) -> (b) { b(i) = a(i) }" , {F (1 )}, {F (1 )}, " main" );
9898}
9999
100100// segfaults on line:
101101// src/aten/aten_compiler.cc:123
102102// 123 at::Backend backend = inputs[0].type().backend();
103- TEST (FailTest , DISABLED_E5) {
103+ TEST (TestCornerCases , DISABLED_E5) {
104104 Succeed (" def f() -> (b) { b(i) = 4 where i in 0:10 }" , {}, {F (0 )});
105105}
106106
107- TEST (FailTest , E6 ) {
107+ TEST (TestCornerCases , E6 ) {
108108 Succeed (" def f(float a) -> (b) { b(i) = a where i in 0:10 }" , {F ()}, {F (10 )});
109109}
110110
111- TEST (FailTest , E7 ) {
111+ TEST (TestCornerCases , E7 ) {
112112 Fail (
113113 " expected 2 inputs" ,
114114 " def f(float a, float c) -> (b) { b(i) = a where i in 0:10 }" ,
115115 {F ()},
116116 {F (10 )});
117117}
118118
119- TEST (FailTest , E8 ) {
119+ TEST (TestCornerCases , E8 ) {
120120 Fail (
121121 " expected type int32" ,
122122 " def f(int32 a) -> (b) { b(i) = a where i in 0:10 }" ,
123123 {F ()},
124124 {F (10 )});
125125}
126126
127- TEST (FailTest , E9 ) {
127+ TEST (TestCornerCases , E9 ) {
128128 Fail (
129129 " expected a tensor with 0" ,
130130 " def f(int32 a) -> (b) { b(i) = a where i in 0:10 }" ,
131131 {I (1 , 2 )},
132132 {F (10 )});
133133}
134134
135- TEST (FailTest , E10 ) {
135+ TEST (TestCornerCases , E10 ) {
136136 Succeed (
137137 " def f(int32 a) -> (b) { b(i) = a where i in 0:10 }" , {I ()}, {I (10 , 10 )});
138138}
139139
140- TEST (FailTest , E11 ) {
140+ TEST (TestCornerCases , E11 ) {
141141 Fail (
142142 " expected integral type" ,
143143 " def f(int32(N) a) -> (b) { b(i) = a(i + .5) }" ,
144144 {I ()},
145145 {I (10 , 10 )});
146146}
147147
148- TEST (FailTest , E12 ) {
148+ TEST (TestCornerCases , E12 ) {
149149 // this test should eventually work when we can handle non-trivial
150150 // expressions in where clauses
151151 Fail (
@@ -155,7 +155,7 @@ TEST(FailTest, E12) {
155155 {I (10 )});
156156}
157157
158- TEST (FailTest , E13 ) {
158+ TEST (TestCornerCases , E13 ) {
159159 // this test is harder still, because the bounds of the output
160160 // depend on the non-trivial expression
161161 Fail (
@@ -165,7 +165,7 @@ TEST(FailTest, E13) {
165165 {I (10 )});
166166}
167167
168- TEST (FailTest , DISABLED_E14) {
168+ TEST (TestCornerCases , DISABLED_E14) {
169169 // Currently expressions in where clauses are assumed to be
170170 // affine. Needs fixing.
171171 Fail (
@@ -175,7 +175,7 @@ TEST(FailTest, DISABLED_E14) {
175175 {I (10 )});
176176}
177177
178- TEST (FailTest , E15 ){
178+ TEST (TestCornerCases , E15 ){
179179#define GEN_COMPARATOR (op ) \
180180 { \
181181 auto a = F (); \
@@ -195,7 +195,7 @@ TEST(FailTest, E15){
195195
196196}
197197
198- TEST (FailTest , E16 ){
198+ TEST (TestCornerCases , E16 ){
199199#define GEN_BOOLS (op ) \
200200 { \
201201 auto a = F (); \
@@ -213,21 +213,21 @@ TEST(FailTest, E16){
213213
214214 GEN_BOOLS (||) GEN_BOOLS (&&)}
215215
216- TEST (FailTest , E17 ) {
216+ TEST (TestCornerCases , E17 ) {
217217 auto r = F (1 );
218218 Succeed (
219219 " def f(float(1) a) -> (b) { b(i) = 4.0 where a(i) exists }" , {F (1 )}, {r});
220220 CHECK_EQ (at::Scalar (r[0 ]).toFloat (), 4 );
221221}
222222
223- TEST (FailTest , E18 ) {
223+ TEST (TestCornerCases , E18 ) {
224224 auto a = F (1 );
225225 auto r = F (1 );
226226 Succeed (
227227 " def f(float(1) a) -> (b) { b(i) = 2*foo where foo = a(i) }" , {a}, {r});
228228 CHECK_EQ (at::Scalar (r[0 ]).toFloat (), at::Scalar (a[0 ]).toFloat () * 2 );
229229}
230- TEST (FailTest , E19 ) {
230+ TEST (TestCornerCases , E19 ) {
231231 Fail (
232232 " undefined variable" ,
233233 " def f(float(1) a) -> (b) { b(i) = 2*foo where foo = a(i), foo in 1:2 }" ,
0 commit comments