@@ -225,36 +225,42 @@ end
225
225
return [x; x; x]
226
226
end
227
227
@test f (x_concrete) == ones (Bool, 3 )
228
+ @test eltype (f (x_concrete)) === Bool
228
229
229
230
# hcat
230
231
f = Reactant. compile ((x_concrete,)) do x
231
232
return [x x x]
232
233
end
233
234
@test f (x_concrete) == ones (Bool, 1 , 3 )
235
+ @test eltype (f (x_concrete)) === Bool
234
236
235
237
# hvcat
236
238
f = Reactant. compile ((x_concrete,)) do x
237
239
return [x x x; x x x]
238
240
end
239
241
@test f (x_concrete) == ones (Bool, 2 , 3 )
242
+ @test eltype (f (x_concrete)) === Bool
240
243
241
244
# typed_vcat
242
245
f = Reactant. compile ((x_concrete,)) do x
243
246
return Int[x; x; x]
244
247
end
245
248
@test f (x_concrete) == ones (Int, 3 )
249
+ @test eltype (f (x_concrete)) === Int
246
250
247
251
# typed_hcat
248
252
f = Reactant. compile ((x_concrete,)) do x
249
253
return Int[x; x; x]
250
254
end
251
255
@test f (x_concrete) == ones (Int, 1 , 3 )
256
+ @test eltype (f (x_concrete)) === Int
252
257
253
258
# typed_hvcat
254
259
f = Reactant. compile ((x_concrete,)) do x
255
260
return Int[x x x; x x x]
256
261
end
257
262
@test f (x_concrete) == ones (Int, 2 , 3 )
263
+ @test eltype (f (x_concrete)) === Int
258
264
end
259
265
260
266
@testset " 1-dim" begin
@@ -272,36 +278,42 @@ end
272
278
return [x; x; x]
273
279
end
274
280
@test f (x_concrete) == ones (Bool, 6 )
281
+ @test eltype (f (x_concrete)) === Bool
275
282
276
283
# hcat
277
284
f = Reactant. compile ((x_concrete,)) do x
278
285
return [x x x]
279
286
end
280
287
@test f (x_concrete) == ones (Bool, 2 , 3 )
288
+ @test eltype (f (x_concrete)) === Bool
281
289
282
290
# hvcat
283
291
f = Reactant. compile ((x_concrete,)) do x
284
292
return [x x x; x x x]
285
293
end
286
294
@test f (x_concrete) == ones (Bool, 4 , 3 )
295
+ @test eltype (f (x_concrete)) === Bool
287
296
288
297
# typed_vcat
289
298
f = Reactant. compile ((x_concrete,)) do x
290
299
return Int[x; x; x]
291
300
end
292
301
@test f (x_concrete) == ones (Int, 6 )
302
+ @test eltype (f (x_concrete)) === Int
293
303
294
304
# typed_hcat
295
305
f = Reactant. compile ((x_concrete,)) do x
296
306
return Int[x; x; x]
297
307
end
298
308
@test f (x_concrete) == ones (Int, 2 , 3 )
309
+ @test eltype (f (x_concrete)) === Int
299
310
300
311
# typed_hvcat
301
312
f = Reactant. compile ((x_concrete,)) do x
302
313
return Int[x x x; x x x]
303
314
end
304
315
@test f (x_concrete) == ones (Int, 4 , 3 )
316
+ @test eltype (f (x_concrete)) === Int
305
317
end
306
318
307
319
x = ones (2 , 4 , 3 )
0 commit comments