Mercurial > repos > public > sbplib_julia
comparison test/LazyTensors/lazy_tensor_test.jl @ 1207:f1c2a4fa0ee1 performance/get_region_type_inference
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 03 Feb 2023 22:14:47 +0100 |
parents | aa72f067e771 |
children | 471a948cd2b2 |
comparison
equal
deleted
inserted
replaced
919:b41180efb6c2 | 1207:f1c2a4fa0ee1 |
---|---|
1 using Test | |
2 using Sbplib.LazyTensors | |
3 | |
4 @testset "Generic Mapping methods" begin | |
5 struct DummyMapping{T,R,D} <: LazyTensor{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 |