comparison test/LazyTensors/tensor_mapping_test.jl @ 750:f88b2117dc69 feature/laplace_opset

Merge in default
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Fri, 19 Mar 2021 16:52:53 +0100
parents de2df1214394
children 1ba8a398af9c
comparison
equal deleted inserted replaced
723:c16abc564b82 750:f88b2117dc69
1 using Test
2 using Sbplib.LazyTensors
3
4 @testset "Generic Mapping methods" begin
5 struct DummyMapping{T,R,D} <: TensorMapping{T,R,D} end
6 LazyTensors.apply(m::DummyMapping{T,R,D}, v, I::Vararg{Any,R}) where {T,R,D} = :apply
7 @test range_dim(DummyMapping{Int,2,3}()) == 2
8 @test domain_dim(DummyMapping{Int,2,3}()) == 3
9 @test apply(DummyMapping{Int,2,3}(), zeros(Int, (0,0,0)),0,0) == :apply
10 @test eltype(DummyMapping{Int,2,3}()) == Int
11 @test eltype(DummyMapping{Float64,2,3}()) == Float64
12 end