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.139 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.138 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.137 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.136 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.135 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.134 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.133 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.132 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.131 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.130 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.129 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.128 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.127 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.126 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.125 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.124 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.123 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.122 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.121 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.120 tracks/perl6/exercises/etl/.meta/exercise-data.yaml