diff LazyTensors/test/runtests.jl @ 186:715ff09bb2ce boundary_conditions

Rename and export types in LazyTensors follow julia conventions
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 20 Jun 2019 21:31:15 +0200
parents 6945c15a6a7a
children 25d2ef206fe9
line wrap: on
line diff
--- a/LazyTensors/test/runtests.jl	Thu Jun 20 21:15:48 2019 +0200
+++ b/LazyTensors/test/runtests.jl	Thu Jun 20 21:31:15 2019 +0200
@@ -4,21 +4,21 @@
 
 
 @testset "Generic Mapping methods" begin
-    struct DummyMapping{T,R,D} <: LazyTensors.Mapping{T,R,D} end
+    struct DummyMapping{T,R,D} <: TensorMapping{T,R,D} end
     LazyTensors.apply(m::DummyMapping{T,R,D}, v, i) where {T,R,D} = :apply
     @test range_dim(DummyMapping{Int,2,3}()) == 2
     @test domain_dim(DummyMapping{Int,2,3}()) == 3
     @test apply(DummyMapping{Int,2,3}(), zeros(Int, (0,0,0)),0) == :apply
 end
 
-struct DummyOperator{T,D} <: LazyTensors.Operator{T,D} end
 @testset "Generic Operator methods" begin
+    struct DummyOperator{T,D} <: TensorOperator{T,D} end
     @test range_size(DummyOperator{Int,2}(), (3,5)) == (3,5)
     @test domain_size(DummyOperator{Float64, 3}(), (3,3,1)) == (3,3,1)
 end
 
 @testset "Mapping transpose" begin
-    struct DummyMapping{T,R,D} <: LazyTensors.Mapping{T,R,D} end
+    struct DummyMapping{T,R,D} <: TensorMapping{T,R,D} end
 
     LazyTensors.apply(m::DummyMapping{T,R,D}, v, i) where {T,R,D} = :apply
     LazyTensors.apply_transpose(m::DummyMapping{T,R,D}, v, i) where {T,R,D} = :apply_transpose
@@ -37,7 +37,7 @@
 end
 
 @testset "TensorApplication" begin
-    struct DummyMapping{T,R,D} <: LazyTensors.Mapping{T,R,D} end
+    struct DummyMapping{T,R,D} <: TensorMapping{T,R,D} end
 
     LazyTensors.apply(m::DummyMapping{T,R,D}, v, i) where {T,R,D} = (:apply,v,i)
     LazyTensors.apply_transpose(m::DummyMapping{T,R,D}, v, i) where {T,R,D} = :apply_transpose