use Test::More;
$Config{useithreads}
- or plan skip_all => "can't test Imager's lack of threads support with no threads";
+ or plan skip_all => "can't test Imager's threads support with no threads";
$] > 5.008007
- or plan skip_all => "require a perl with CLONE_SKIP to test Imager's lack of threads support";
+ or plan skip_all => "require a perl with CLONE_SKIP to test Imager's threads support";
$loaded_threads
or plan skip_all => "couldn't load threads";
$Test::More::VERSION =~ /^2\.00_/
and plan skip_all => "threads are hosed in 2.00_06 and presumably all 2.00_*";
-plan tests => 11;
+plan tests => 13;
my $thread = threads->create(sub { 1; });
ok($thread->join, "join first thread");
-# these are all, or contain, XS allocated objects, if we don't
-# probably handle CLONE requests, or provide a CLONE_SKIP, we'll
-# probably see a double-free, one from the thread, and the other from
-# the main line of control.
+# these are all, or contain, XS allocated objects, if we don't handle
+# CLONE requests, or provide a CLONE_SKIP, we'll probably see a
+# double-free, one from the thread, and the other from the main line
+# of control.
+#
# So make one of each
my $im = Imager->new(xsize => 10, ysize => 10);
(
sub {
ok(!UNIVERSAL::isa($im->{IMG}, "Imager::ImgRaw"),
- "the low level image object should be undef");
+ "the low level image object should become unblessed");
+ ok(!$im->_valid_image, "image no longer considered valid");
+ is($im->errstr, "images do not cross threads",
+ "check error message");
1;
}
);