### ----------------------------------------------------
### -- JSON::Unmarshal
### -- Licenses: Artistic-2.0
### -- Authors: Tadeusz Sośnierz, Raku Community
### -- File: t/070-parameterised.rakutest
### ----------------------------------------------------
use Test;

use JSON::Unmarshal;

plan 2;

class C {
	has Str %.bla{subset :: of Str where any("ble", "blob")}
} 

my $res;

lives-ok { 
    $res = unmarshal( ｢{"bla": {"ble": "bli"}}｣, C);
}, "unmarshal class with hash with subset constrained values";

is $res.bla<ble> , 'bli', "and the result is what is expected";

# vim: expandtab shiftwidth=4 ft=raku


