• Stars
    star
    3
  • Rank 3,863,489 (Top 79 %)
  • Language
    Perl
  • Created almost 12 years ago
  • Updated about 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Test::Deep type check matchers

NAME

Test::Deep::Matcher - Type check matchers for Test::Deep

SYNOPSIS

use Test::More;
use Test::Deep;
use Test::Deep::Matcher;

my $got = +{
    foo  => 'string',
    bar  => 100,
    baz  => [ 1, 2, 3 ],
    quux => { foo => 'bar' },
};

cmp_deeply($got, +{
    foo  => is_string,
    bar  => is_integer,
    baz  => is_array_ref,
    quux => is_hash_ref,
});

done_testing;

DESCRIPTION

Test::Deep::Matcher is a collection of Test::Deep type check matchers.

METHODS

Reference Matchers

is_scalar_ref

Checks the value type is SCALAR reference.

is_array_ref

Checks the value type is ARRAY reference.

is_hash_ref

Checks the value type is HASH reference.

is_code_ref

Checks the value type is CODE reference.

is_glob_ref

Checks the value type is GLOB reference.

Primitive Matchers

is_value

Checks the value is primitive, is not undef.

is_string

Checks the value is string, has length.

is_number

Checks the value is number.

is_integer

Checks the value is integer, is also number.

AUTHOR

NAKAGAWA Masaki <[email protected]>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Test::Deep, Data::Util, Test::Deep::Type

More Repositories

1

Brownie

Browser integration framework inspired by Capybara
Perl
24
star
2

jenkins-travis-yml-plugin

go to https://github.com/jenkinsci/travis-yml-plugin
Ruby
21
star
3

mousex-attributehelpers

extending attributes for Mouse
Perl
11
star
4

http-router

HTTP::Router provides a Merb-like way of constructing routing tables.
Perl
11
star
5

mousex-getopt

A Mouse role for processing command line options
Perl
7
star
6

catalyst-controller-resources

catalyst base controller for HTTP verb-oriented actions
Perl
6
star
7

Test-Fake-HTTPD

The fake HTTP server module for testing
Perl
6
star
8

trinity

Perl
6
star
9

Test-Mock-LWP-Conditional

LWP mocking module like WebMock
Perl
6
star
10

uri-template-restrict

restricted URI Templates handler
Perl
6
star
11

Test-Double

Test::Double is a Perl extension for Test Double. See: http://xunitpatterns.com/Test%20Double.html
Perl
5
star
12

couchdb-object

Yet another CouchDB client.
Perl
4
star
13

Mouse-Util-MetaRole

Apply roles to any metaclass, as well as the object base class.
Perl
4
star
14

bot-irc

Bot::IRC is a framework for pluggable IRC bot.
3
star
15

mousex-types-path-class

A Path::Class type library for Mouse
Perl
3
star
16

mousex-configfromfile

An abstract Mouse role for setting attributes from a configfile
Perl
3
star
17

TracTaskBoardPlugin

Provides a task board "Kanban" of tickets
JavaScript
3
star
18

UNIVERSAL-tap

Ruby's tap() in Perl
Perl
2
star
19

MouseX-StrictConstructor

make strict constructor for Mouse
Perl
2
star
20

p5-LWP-UserAgent-DNS-Hosts

Override LWP HTTP/HTTPS request's host like /etc/hosts
Perl
2
star
21

p5-Selenium-Server

A wrapper of selenium-server.jar
Perl
2
star
22

XML-Atom-Ext-Threading

XML::Atom extension for Atom Threading Extensions (RFC 4685)
Perl
2
star
23

Data-OpenStruct-Deep

It creates and sets arbitrary attributes like ruby's OpenStruct, and allows you to deep attributes.
Perl
2
star
24

activeresource-more

Extensions for ActiveResource 2.x
Ruby
1
star
25

MouseX-Types-URI

Perl
1
star
26

MouseX-Types-DateTime

Perl
1
star
27

Mouse-Exporter

(DEPRECATED) SEE Mouse 0.39 or higher.
Perl
1
star
28

jenkins-slave-builder

Python
1
star