### ----------------------------------------------------
### -- Chemistry::Elements
### -- Licenses: Artistic-2.0
### -- Authors: brian d foy, Raku Community
### -- File: t/005.ZInt-subtype.rakutest
### ----------------------------------------------------
use Test;
use Chemistry::Elements;

plan 4;

lives-ok { my ZInt $Z = 50 },
  "Can assign positive whole number to ZInt";
lives-ok { my ZInt $Z = "51" },
  "Can assign number as string to ZInt";

throws-like { my ZInt $Z = -2 }, X::TypeCheck::Assignment,
  "Can't assign negative number to ZInt";
throws-like { my ZInt $Z = 999 }, X::TypeCheck::Assignment,
  "Can't assign out-of-range number to ZInt";

# vim: expandtab shiftwidth=4


