Skip to content

Commit 7f9a6a5

Browse files
close orphaned windows from other tests
1 parent ae0232c commit 7f9a6a5

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

test/glist.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ using Test
77

88
@testset "pointers" begin
99

10-
w = Window("Window", 400, 300)
10+
w1 = Window("Window", 400, 300)
1111
nb = Notebook()
12-
w = push!(Window("Notebook"),nb)
13-
l = ccall((:gtk_container_get_children,Gtk.libgtk),Ptr{Gtk._GList{Gtk.GtkWidget}},(Ptr{Gtk.GObject},),w)
12+
w2 = push!(Window("Notebook"),nb)
13+
l = ccall((:gtk_container_get_children,Gtk.libgtk),Ptr{Gtk._GList{Gtk.GtkWidget}},(Ptr{Gtk.GObject},),w2)
1414

1515
@test eltype(l)==Gtk.GtkWidget
1616

@@ -22,6 +22,9 @@ for item in l
2222
@test item==nb
2323
end
2424

25+
destroy(w1)
26+
destroy(w2)
27+
2528
end
2629

2730
@testset "string" begin

test/gui.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ end
582582
@test mtrx.xx == 300
583583
@test mtrx.yy == 280
584584
@test mtrx.xy == mtrx.yx == mtrx.x0 == mtrx.y0 == 0
585+
destroy(win)
585586
end
586587

587588
@testset "Menus" begin

test/tree.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,6 @@ select!(selection, iter)
7676
@test length(selection) == 1
7777

7878
# this crashes
79-
# iters = Gtk.selected_rows(selection)
79+
# iters = Gtk.selected_rows(selection)
80+
81+
destroy(window)

0 commit comments

Comments
 (0)