Skip to content

Commit ea56543

Browse files
committed
Add tests
1 parent 28e6ca5 commit ea56543

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[deps]
22
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
3-
Metal = "dde4c033-4e86-420c-a63e-0dd931031962"
3+
JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb"
44
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
55
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

NDTensors/src/lib/Expose/test/runtests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ using NDTensors.GPUArraysCoreExtensions: cpu
5858
expose(o)[] = 2
5959
@test expose(o)[] == 2
6060

61-
fill!(m, 0)
61+
fill!(m, zero(elt))
6262
@test any(!Base.isinf, expose(m))
6363

6464
mp = copy(Ea)
6565
@test mp == ma
66-
fill!(ma, 2.0)
66+
fill!(ma, elt(2))
6767
copyto!(expose(mp), expose(ma))
6868
@test mp == ma
6969

@@ -112,7 +112,7 @@ using NDTensors.GPUArraysCoreExtensions: cpu
112112
@test norm(m) sqrt(6^2 * 10)
113113

114114
m = reshape(m, (5, 2, 1))
115-
mt = fill!(similar(m), 3.0)
115+
mt = fill!(similar(m), elt(3))
116116
m = permutedims(expose(m), (2, 1, 3))
117117
@test size(m) == (2, 5, 1)
118118
permutedims!(expose(m), expose(mt), (2, 1, 3))
@@ -184,7 +184,7 @@ using NDTensors.GPUArraysCoreExtensions: cpu
184184
copyto!(expose(y), expose(x))
185185
@allowscalar begin
186186
@test y == x
187-
## temporarily use expose copy because this is broken in Metal 1.1
187+
## temporarily use expose copy because this is broken in Metal 1.1
188188
@test copy(expose(x)) == x
189189
end
190190

0 commit comments

Comments
 (0)