Skip to content

Commit

Permalink
fix order in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLampert committed May 8, 2023
1 parent b3408fc commit 7460bf7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/tests_basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ end
@test vertices isa Array{Float64, 2}
@test unsafe_wrap(Array{Float64}, connectivity_pw.vertices, (3, n_vertices)) isa Array{Float64, 2}
@test unsafe_wrap(Array{Float64, 2}, connectivity_pw.vertices, (3, n_vertices)) isa Array{Float64, 2}
# wrapping vectors
vertices = @test_nowarn unsafe_wrap(Array, connectivity_pw.vertices, 3 * n_vertices)
@test vertices isa Array{Float64, 1}
@test unsafe_wrap(Array{Float64}, connectivity_pw.vertices, 3 * n_vertices) isa Array{Float64, 1}
@test unsafe_wrap(Array{Float64, 1}, connectivity_pw.vertices, 3 * n_vertices) isa Array{Float64, 1}

@test size(vertices) == (3, n_vertices)
@test vertices[1, 1] == connectivity_pw.vertices[1] == 0.0
@test_nowarn vertices[1, 1] = 1.0
@test vertices[1, 1] == connectivity_pw.vertices[1] == 1.0
@test_nowarn connectivity_pw.vertices[1] = 2.0
@test vertices[1, 1] == connectivity_pw.vertices[1] == 2.0
# wrapping vectors
vertices = @test_nowarn unsafe_wrap(Array, connectivity_pw.vertices, 3 * n_vertices)
@test vertices isa Array{Float64, 1}
@test unsafe_wrap(Array{Float64}, connectivity_pw.vertices, 3 * n_vertices) isa Array{Float64, 1}
@test unsafe_wrap(Array{Float64, 1}, connectivity_pw.vertices, 3 * n_vertices) isa Array{Float64, 1}

@test_nowarn p4est_destroy(p4est_pw)
@test_nowarn p4est_connectivity_destroy(connectivity_pw)
Expand Down

0 comments on commit 7460bf7

Please sign in to comment.