File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 71
71
72
72
check_leaks ()
73
73
74
+ @testset " test DArray similar" begin
75
+ D = drand ((200 ,200 ), [MYID, OTHERIDS])
76
+ DS = similar (D,Float16)
77
+
78
+ @testset " test eltype of a similar" begin
79
+ @test eltype (DS) == Float16
80
+ end
81
+
82
+ @testset " test dims of a similar" begin
83
+ @test size (D) == size (DS)
84
+ end
85
+ close (D)
86
+ close (DS)
87
+ end
88
+
89
+ check_leaks ()
90
+
91
+ @testset " test DArray reshape" begin
92
+ D = drand ((200 ,200 ), [MYID, OTHERIDS])
93
+
94
+ @testset " Test error-throwing in reshape" begin
95
+ @test_throws DimensionMismatch reshape (D,(100 ,100 ))
96
+ end
97
+
98
+ DR = reshape (D,(100 ,400 ))
99
+ @testset " Test reshape" begin
100
+ @test size (DR) == (100 ,400 )
101
+ end
102
+ close (D)
103
+ end
104
+
105
+ check_leaks ()
106
+
74
107
@testset " test @DArray comprehension constructor" begin
75
108
76
109
@testset " test valid use of @DArray" begin
You can’t perform that action at this time.
0 commit comments