#!/usr/bin/env perl6 use v6; use Test; use lib my $dir = $?FILE.IO.dirname; use JSON::Fast; my Str:D $exercise := 'Clock'; my Version:D $version = v1; my Str $module //= $exercise; INIT { 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