Skip to content

Commit 080aa6f

Browse files
Fix tests
1 parent 653acb6 commit 080aa6f

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

test/ext-test/cpu/makie/makie_ext.jl

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,24 @@ end
6565

6666
@testset "Makie Bloch sphere" begin
6767
ρ = 0.7 * ket2dm(basis(2, 0)) + 0.3 * ket2dm(basis(2, 1))
68-
fig, ax = plot_bloch(ρ)
68+
fig, lscene = plot_bloch(ρ)
6969
@test fig isa Figure
70-
@test ax isa Axis3
70+
@test lscene isa LScene
7171

7272
ψ = (basis(2, 0) + basis(2, 1)) / 2
73-
fig, ax = plot_bloch(ψ)
73+
fig, lscene = plot_bloch(ψ)
7474
@test fig isa Figure
75-
@test ax isa Axis3
75+
@test lscene isa LScene
7676

7777
ϕ = dag(ψ)
78-
fig, ax = plot_bloch(ϕ)
78+
fig, lscene = plot_bloch(ϕ)
7979
@test fig isa Figure
80-
@test ax isa Axis3
80+
@test lscene isa LScene
8181

8282
fig = Figure()
83-
pos = fig[1, 1]
84-
fig1, ax = plot_bloch(ψ; location = pos)
83+
ax = Axis(fig[1, 1])
84+
pos = fig[1, 2]
85+
fig1, lscene = plot_bloch(ψ; location = pos)
8586
@test fig1 === fig
8687

8788
b = Bloch()
@@ -141,9 +142,9 @@ end
141142
add_line!(b, [0, 0, 0], [1, 1, 1])
142143
add_arc!(b, [1, 0, 0], [0, 1, 0], [0, 0, 1])
143144
try
144-
fig, ax = QuantumToolbox.render(b)
145+
fig, lscene = render(b)
145146
@test !isnothing(fig)
146-
@test !isnothing(ax)
147+
@test !isnothing(lscene)
147148
catch e
148149
@test false
149150
@info "Render threw unexpected error" exception=e
@@ -153,9 +154,9 @@ end
153154
ψ₂ = normalize(basis(2, 0) - im * basis(2, 1))
154155
add_line!(b, ψ₁, ψ₂; fmt = "r--")
155156
try
156-
fig, ax = QuantumToolbox.render(b)
157+
fig, lscene = render(b)
157158
@test !isnothing(fig)
158-
@test !isnothing(ax)
159+
@test !isnothing(lscene)
159160
catch e
160161
@test false
161162
@info "Render threw unexpected error" exception=e
@@ -187,9 +188,9 @@ end
187188
add_line!(b, [1, 0, 0], [0, 1, 0])
188189
add_arc!(b, [1, 0, 0], [0, 1, 0], [0, 0, 1])
189190
try
190-
fig, ax = render(b)
191+
fig, lscene = render(b)
191192
@test !isnothing(fig)
192-
@test !isnothing(ax)
193+
@test !isnothing(lscene)
193194
catch e
194195
@test false
195196
@info "Render threw unexpected error" exception=e
@@ -202,9 +203,9 @@ end
202203
add_arc!(b, ψ₁, ψ₂)
203204
add_arc!(b, ψ₂, ψ₃, ψ₁)
204205
try
205-
fig, ax = render(b)
206+
fig, lscene = render(b)
206207
@test !isnothing(fig)
207-
@test !isnothing(ax)
208+
@test !isnothing(lscene)
208209
catch e
209210
@test false
210211
@info "Render threw unexpected error" exception=e

0 commit comments

Comments
 (0)