aboutsummaryrefslogtreecommitdiff
path: root/t/02-empty-source.t
blob: 684a98be12179670507e7c0869f91ae271839241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /usr/bin/env perl6

use v6.c;
use lib 'lib';
use Test;

plan 2;

use Hash::Merge;

my Hash $hash = {
    a => "a",
    b => {
        c => "c"
    }
};

my Hash $empty = {};

$empty.merge($hash);

is-deeply $empty, $hash, "Merge into empty hash";

my Hash $nil;

$nil.merge($hash);

is-deeply $nil, $hash, "Merge into uninitialized hash";