1#!/usr/bin/perl env
2
3use strict;
4use warnings;
5
6use Test::More tests => 5;
7
8use Input::Validator::Constraint::In;
9
10my $constraint = Input::Validator::Constraint::In->new(args => [1, 5, 7]);
11ok($constraint);
12is($constraint->is_valid(1), 1);
13is($constraint->is_valid(7), 1);
14is($constraint->is_valid(2), 0);
15
16$constraint = Input::Validator::Constraint::In->new(args => [0, 1]);
17is($constraint->is_valid(0), 1);
18