
use v6;
use Test;
use GTK::Simple;

plan *;

if %*ENV<DISPLAY> or $*DISTRO.is-win {
    my $g;
    lives-ok {$g = GTK::Simple::App.new}
    lives-ok {GTK::Simple::Scheduler.new.cue: {$g.exit}}
    lives-ok {$g.run}
}

done-testing;


use v6;
use Test;
use GTK::Simple;
use GTK::Simple::App;
use GTK::Simple::Scheduler;

plan *;

if %*ENV<DISPLAY> or $*DISTRO.is-win {
    my $g;
    lives-ok {$g = GTK::Simple::App.new}
    lives-ok {GTK::Simple::Scheduler.new.cue: {$g.exit}}
    lives-ok {$g.run}
}

done-testing;

Add missing use statements in test file
Add missing use statements in test file

The design of Perl 6 requires that use statements only have effect in a
lexical scope. Otherwise it's impossible to use different (versions of)
modules sharing a name in different parts of a program.

This means essentially that we need to explicitly use all modules we need
in a scope.
