diff test/testLazyTensors.jl @ 434:648a36ebac99 feature/lazy_identity

Change name from LazyIdentity to IdentityMapping
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 19 Oct 2020 09:51:56 +0200
parents 7327a3e41df0
children 1db5ec38955e
line wrap: on
line diff
--- a/test/testLazyTensors.jl	Mon Oct 19 09:50:16 2020 +0200
+++ b/test/testLazyTensors.jl	Mon Oct 19 09:51:56 2020 +0200
@@ -281,12 +281,12 @@
 end
 
 
-@testset "LazyIdentity" begin
-    @test LazyIdentity{Float64}((4,5)) isa LazyIdentity{T,2} where T
-    @test LazyIdentity{Float64}((4,5)) isa TensorMapping{T,2,2} where T
+@testset "IdentityMapping" begin
+    @test IdentityMapping{Float64}((4,5)) isa IdentityMapping{T,2} where T
+    @test IdentityMapping{Float64}((4,5)) isa TensorMapping{T,2,2} where T
 
     for sz ∈ [(4,5),(3,),(5,6,4)]
-        I = LazyIdentity{Float64}(sz)
+        I = IdentityMapping{Float64}(sz)
         v = rand(sz...)
         @test I*v == v
         @test I'*v == v
@@ -295,7 +295,7 @@
         @test domain_size(I) == sz
     end
 
-    I = LazyIdentity{Float64}((4,5))
+    I = IdentityMapping{Float64}((4,5))
     v = rand(4,5)
     @inferred (I*v)[3,2]
     @test_broken @inferred (I'*v)[3,2] # TODO: Should fix the index typing before investigating this