Skip to content

Commit

Permalink
Add tests for cubesize and formatbytes
Browse files Browse the repository at this point in the history
  • Loading branch information
felixcremer committed Oct 17, 2024
1 parent 6d82692 commit f27500c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/Cubes/cubes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ using DimensionalData
@test a2.properties == Dict("att" => 5)
@test YAXArrayBase.iscompressed(a) == false
end

@testset "cubesize" begin
@test Cubes.cubesize(a) == 160
a32 = map(Float32, a)
@test Cubes.cubesize(a32) == 80

@test endswith(Cubes.formatbytes(160), "bytes")
@test endswith(Cubes.formatbytes(1205), "KB")
@test endswith(Cubes.formatbytes(1200000), "MB")
end
#=
@testset "Subsets" begin
s = YAXArrays.Cubes.subsetcube(a, X = 1.5..3.5)
Expand Down

0 comments on commit f27500c

Please sign in to comment.