#!/usr/bin/env perl6 use v6; use Test; use lib my $dir = $?FILE.IO.dirname; use JSON::Tiny; my $exercise = 'Clock'; my $version = v1; my $module = %*ENV ?? 'Example' !! $exercise; plan 54; use-ok $module or bail-out; require ::($module); if ::($exercise).^ver !~~ $version { warn "\nExercise version mismatch. Further tests may fail!" ~ "\n$exercise is $(::($exercise).^ver.gist). " ~ "Test is $($version.gist).\n"; bail-out 'Example version must match test version.' if %*ENV; } subtest 'Class methods', { ok ::($exercise).can($_), $_ for