Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed Nov 7, 2023
1 parent 150ee44 commit ec84587
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions test/transforms/functional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,17 @@
tₒ = revert(T, n, c)
@test Tables.matrix(t) Tables.matrix(tₒ)

x = rand(Normal(0, 25), 100)
y = x + rand(Normal(10, 2), 100)
# identity
x = rand(100)
y = x + rand(100)
t = Table(; x, y)
T = Functional(exp)

T = Functional(identity)
n, c = apply(T, t)
@test all(>(0), n.x)
@test all(>(0), n.y)
@test t == n
tₒ = revert(T, n, c)
@test Tables.matrix(t) Tables.matrix(tₒ)
@test tₒ == t

x = rand(Normal(0, 25), 100)
y = x + rand(Normal(10, 2), 100)
t = Table(; x, y)
T = Functional(x -> x)
n, c = apply(T, t)
@test t == n
Expand Down

0 comments on commit ec84587

Please sign in to comment.