Mercurial > repos > public > sbplib_julia
comparison test/Grids/grid_test.jl @ 1273:7fab13c07412 refactor/grids
Allow multi-argument functions in eval_on
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 25 Feb 2023 22:57:00 +0100 |
parents | 3637daad71e8 |
children | dcd8654ca33b |
comparison
equal
deleted
inserted
replaced
1272:3637daad71e8 | 1273:7fab13c07412 |
---|---|
37 | 37 |
38 # Vector valued function | 38 # Vector valued function |
39 @test eval_on(g, x̄ -> @SVector[x̄[2], x̄[1]]) isa LazyArray{SVector{2,Float64}} | 39 @test eval_on(g, x̄ -> @SVector[x̄[2], x̄[1]]) isa LazyArray{SVector{2,Float64}} |
40 @test eval_on(g, x̄ -> @SVector[x̄[2], x̄[1]]) == map(x̄ -> @SVector[x̄[2], x̄[1]], g) | 40 @test eval_on(g, x̄ -> @SVector[x̄[2], x̄[1]]) == map(x̄ -> @SVector[x̄[2], x̄[1]], g) |
41 | 41 |
42 | 42 # Multi-argument functions |
43 | |
44 f(x,y) = sin(x)*cos(y) | 43 f(x,y) = sin(x)*cos(y) |
45 @test_broken eval_on(g, f) == map(p->f(p...), points(g)) | 44 @test eval_on(g, f) == map(x̄->f(x̄...), g) |
46 end | 45 end |
47 | 46 |
48 @testset "getcomponent" begin | 47 @testset "getcomponent" begin |
49 @test_broken false | 48 @test_broken false |
50 end | 49 end |