Sha256: bba939580b443792f93875d77c05924e82f40e96ad07f3f6da0891a149085cde

Contents?: true

Size: 859 Bytes

Versions: 83

Compression:

Stored size: 859 Bytes

Contents

exercise: ETL
version: 2
plan: 4
tests: |-
  =head2 Notes
  =begin para
  The test expects your returned C<Hash> to have
  L<type constraints|https://docs.perl6.org/type/Hash#Constraint_value_types>.
  Defined C<Str>s for the values, and defined C<Int>s for the keys.
  =end para
  for $c-data<cases>.values -> %case-set {
    is-deeply(
      transform(Hash[Array[Str:D], Int:D].new(
        .<input>.pairsĀ».&{
          .key.Int => Array[Str:D](.value.Slip)
        }
      )),
      Hash[Int:D, Str:D].new(.<expected>.pairs),
      .<description>
    ) for %case-set<cases>.values;
  }

unit: module
example: |-
  no precompilation;

  sub transform ( Hash[Array[Str:D], Int:D] $_ --> Hash[Int:D, Str:D] ) is export {
    Hash[Int:D, Str:D].new: .invertĀ».&{ .key.lc => .value }
  }
stub: |-
  no precompilation;

  sub transform (%input) is export {
  }

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.118 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.117 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.116 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.115 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.114 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.113 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.111 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.110 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.109 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.108 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.107 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.106 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.105 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.104 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.103 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.102 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.101 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.100 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.99 tracks/perl6/exercises/etl/example.yaml