Skip to content

Commit

Permalink
Fix Julia 1.6 test failures
Browse files Browse the repository at this point in the history
[42 ; 43;;] # needs Julia 1.8

reshape([42.0, 43.0], 2, 1) # 2×1 Matrix{Float64} on any Julia version
  • Loading branch information
sjdaines committed Jan 5, 2025
1 parent 5105338 commit 1861367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/runfieldtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ end
@test PB.get_data(fr; records=1) == [42.0]
fra = PALEOmodel.get_array(fr; squeeze_all_single_dims=false)
@test size(fra.values) == (1, 1)
@test fra.values == [42.0;;] # 1×1 Matrix{Float64}
@test fra.values == reshape([42.0], 1, 1) # 1×1 Matrix{Float64}
fra_dimensions = PB.get_dimensions(fra)
@test length(fra_dimensions) == 2
@test fra_dimensions[1].name == "cells"
Expand Down Expand Up @@ -245,7 +245,7 @@ end
# FieldArray from FieldRecord - records dim not squeezed out
fra = PALEOmodel.get_array(fr; squeeze_all_single_dims=false)
@test size(fra.values) == (2, 1)
@test fra.values == [42.0 ; 43.0;;] # 2×1 Matrix{Float64}
@test fra.values == reshape([42.0, 43.0], 2, 1) # 2×1 Matrix{Float64}
fra_dimensions = PB.get_dimensions(fra)
@test length(fra_dimensions) == 2
@test fra_dimensions[1].name == "test"
Expand Down

0 comments on commit 1861367

Please sign in to comment.