|
1 |
| -SA_test_ref(x) = SA[1,x,x] |
| 1 | +SA_test_ref(x) = SA[1,x,x] |
| 2 | +SA_test_ref(x,T) = SA{T}[1,x,x] |
2 | 3 | @test @inferred(SA_test_ref(2)) === SVector{3,Int}((1,2,2))
|
3 | 4 | @test @inferred(SA_test_ref(2.0)) === SVector{3,Float64}((1,2,2))
|
| 5 | +@test @inferred(SA_test_ref(2,Float32)) === SVector{3,Float32}((1,2,2)) |
4 | 6 |
|
5 |
| -SA_test_vcat(x) = SA[1;x;x] |
| 7 | +SA_test_vcat(x) = SA[1;x;x] |
| 8 | +SA_test_vcat(x,T) = SA{T}[1;x;x] |
6 | 9 | @test @inferred(SA_test_vcat(2)) === SVector{3,Int}((1,2,2))
|
7 | 10 | @test @inferred(SA_test_vcat(2.0)) === SVector{3,Float64}((1,2,2))
|
| 11 | +@test @inferred(SA_test_vcat(2,Float32)) === SVector{3,Float32}((1,2,2)) |
8 | 12 |
|
9 |
| -SA_test_hcat(x) = SA[1 x x] |
| 13 | +SA_test_hcat(x) = SA[1 x x] |
| 14 | +SA_test_hcat(x,T) = SA{T}[1 x x] |
10 | 15 | @test @inferred(SA_test_hcat(2)) === SMatrix{1,3,Int}((1,2,2))
|
11 | 16 | @test @inferred(SA_test_hcat(2.0)) === SMatrix{1,3,Float64}((1,2,2))
|
| 17 | +@test @inferred(SA_test_hcat(2,Float32)) === SMatrix{1,3,Float32}((1,2,2)) |
12 | 18 |
|
13 | 19 | SA_test_hvcat(x) = SA[1 x x;
|
14 | 20 | x 2 x]
|
| 21 | +SA_test_hvcat(x,T) = SA{T}[1 x x; |
| 22 | + x 2 x] |
15 | 23 | @test @inferred(SA_test_hvcat(3)) === SMatrix{2,3,Int}((1,3,3,2,3,3))
|
16 | 24 | @test @inferred(SA_test_hvcat(3.0)) === SMatrix{2,3,Float64}((1,3,3,2,3,3))
|
17 | 25 | @test @inferred(SA_test_hvcat(1.0im)) === SMatrix{2,3,ComplexF64}((1,1im,1im,2,1im,1im))
|
| 26 | +@test @inferred(SA_test_hvcat(3,Float32)) === SMatrix{2,3,Float32}((1,3,3,2,3,3)) |
18 | 27 |
|
19 | 28 | @test SA[1] === SVector{1,Int}((1))
|
20 | 29 |
|
|
0 commit comments