@@ -58,15 +58,17 @@ function test_scaling_maps(T)
5858end
5959
6060function test_identity_map (T)
61- i1 = StaticIdentityMap {T} ()
62- i2 = StaticIdentityMap {SVector{2,T}} ()
61+ i1 = IdentityMap {T} ()
62+ @test i1 isa FunctionMaps. StaticIdentityMap
63+ i2 = IdentityMap {SVector{2,T}} ()
64+ @test i2 isa FunctionMaps. StaticIdentityMap
6365 test_generic_map (i1)
6466 test_generic_map (i2)
6567 @test i1 == i2
6668 @test hash (i1) == hash (i2)
6769 @test islinearmap (i1)
6870 @test isaffinemap (i1)
69- @test convert (StaticIdentityMap{SVector{2 ,T}}, i1) === i2
71+ @test convert (FunctionMaps . StaticIdentityMap{SVector{2 ,T}}, i1) === i2
7072 @test jacobian (i1) isa ConstantMap
7173 @test jacobian (i1, 1 ) == 1
7274 @test jacdet (i1, 1 ) == 1
@@ -78,13 +80,19 @@ function test_identity_map(T)
7880 @test m2 isa LinearMap{T}
7981 @test jacdet (m2, 1 ) == 1
8082
81- i3 = VectorIdentityMap {T} (10 )
83+ i3 = IdentityMap {Vector{T}} (10 )
84+ @test i3 isa FunctionMaps. VectorIdentityMap
8285 test_generic_map (i3)
8386 r = rand (T, 10 )
8487 @test i3 (r) ≈ r
85- @test hash (i3) == hash (VectorIdentityMap { Int} (10 ))
88+ @test hash (i3) == hash (IdentityMap {Vector{ Int} } (10 ))
8689
8790 @test IdentityMap () ∘ LinearMap (2 ) == LinearMap (2.0 )
91+
92+ @test_throws ArgumentError IdentityMap {Float64} (10 )
93+ @test_throws ArgumentError IdentityMap {Float64} (Val (2 ))
94+ @test IdentityMap {Float64} (1 ) isa Map
95+ @test IdentityMap {Float64} (Val (1 )) isa Map
8896end
8997
9098function test_basic_maps (T)
0 commit comments