Skip to content

Commit

Permalink
Add tests for cubesize and formatbytes (#454)
Browse files Browse the repository at this point in the history
* Add tests for cubesize and formatbytes

* Add codecov yaml
  • Loading branch information
felixcremer authored Oct 17, 2024
1 parent 6d82692 commit 7e8dc8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
comment:
layout: " diff, flags, files"
behavior: default
require_changes: false # learn more in the Requiring Changes section below
require_base: false # [true :: must have a base report to post]
require_head: true
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 7e8dc8e

Please sign in to comment.