@@ -20,6 +20,7 @@ include("infinitearrays.jl")
20
20
21
21
for T in (Int, Float64)
22
22
Z = $ Typ {T} (5 )
23
+ @test $ Typ (T, 5 ) ≡ Z
23
24
@test eltype (Z) == T
24
25
@test Array (Z) == $ funcs (T,5 )
25
26
@test Array {T} (Z) == $ funcs (T,5 )
@@ -34,6 +35,7 @@ include("infinitearrays.jl")
34
35
@test $ Typ (2 ones (T,5 )) == Z
35
36
36
37
Z = $ Typ {T} (5 , 5 )
38
+ @test $ Typ (T, 5 , 5 ) ≡ Z
37
39
@test eltype (Z) == T
38
40
@test Array (Z) == $ funcs (T,5 ,5 )
39
41
@test Array {T} (Z) == $ funcs (T,5 ,5 )
508
510
@test_throws MethodError [1 ,2 ,3 ]* Zeros (3 ) # Not defined for [1,2,3]*[0,0,0] either
509
511
510
512
@testset " Check multiplication by Adjoint vectors works as expected." begin
511
- @test randn (4 , 3 )' * Zeros (4 ) === Zeros (3 )
512
- @test randn (4 )' * Zeros (4 ) === zero (Float64)
513
- @test [1 , 2 , 3 ]' * Zeros {Int} (3 ) === zero (Int)
513
+ @test randn (4 , 3 )' * Zeros (4 ) ≡ Zeros (3 )
514
+ @test randn (4 )' * Zeros (4 ) ≡ transpose ( randn ( 4 )) * Zeros ( 4 ) ≡ zero (Float64)
515
+ @test [1 , 2 , 3 ]' * Zeros {Int} (3 ) ≡ zero (Int)
514
516
@test [SVector (1 ,2 )' , SVector (2 ,3 )' , SVector (3 ,4 )' ]' * Zeros {Int} (3 ) === SVector (0 ,0 )
515
517
@test_throws DimensionMismatch randn (4 )' * Zeros (3 )
516
518
@test Zeros (5 )' * randn (5 ,3 ) ≡ Zeros (5 )' * Zeros (5 ,3 ) ≡ Zeros (5 )' * Ones (5 ,3 ) ≡ Zeros (3 )'
0 commit comments