diff --git a/META6.json b/META6.json index 9d9a441..d5692cf 100644 --- a/META6.json +++ b/META6.json @@ -15,12 +15,12 @@ "finanalyst aka Richard Hainsworth" ], "auth": "zef:finanalyst", - "depends": { + "depends": [{ "by-kernel.name": { "macos": "MacOS::NativeLib:ver<0.0.5>:auth", "": "" } - }, + }], "test-depends": [ "Test" ], @@ -88,4 +88,4 @@ "gui" ], "source-url": "git://github.com/finanalyst/GTK-Simple.git" -} \ No newline at end of file +} diff --git a/t/02-export-subs.rakutest b/t/02-export-subs.rakutest index 2b409d1..7ac3d35 100644 --- a/t/02-export-subs.rakutest +++ b/t/02-export-subs.rakutest @@ -1,4 +1,4 @@ -use v6.d; +use v6.*; use Test; plan *; @@ -6,6 +6,8 @@ plan *; use GTK::Simple :subs; if %*ENV or $*DISTRO.is-win { + my Str @issues; + # We need to create app first my $app; lives-ok { $app = app }, "There is a subroutine in scope called 'app'"; @@ -22,10 +24,25 @@ if %*ENV or $*DISTRO.is-win { next if skip-test($sub-name); my $widget; - lives-ok { $widget = ::{$sub-name}(:label("For Button(s)"), :uri("For LinkButton"), :path("/for/image.png")) }, - "There is a subroutine in scope called '$sub-name'"; + lives-ok { + $widget = + ::{$sub-name}(:label("For Button(s)"), + :uri("For LinkButton"), + :path("/for/image.png")); + + CATCH { + @issues.push: "Missing required named argument for '$sub-name' ({$class.^name}) in test constructor"; + } + }, "There is a subroutine in scope called '$sub-name'"; + ok $widget ~~ $class, "'$sub-name' returns a { $class.^name } object"; } + + if @issues { + diag "+++ ISSUES WITH EXPORT SUB TEST HARNESS +++"; + diag @issues.join("\n"); + diag "+++++++++++++++++++++++++++++++++++++++++++"; + } } done-testing;