Skip to content

Instantly share code, notes, and snippets.

@berekuk
Created May 31, 2012 17:47
Show Gist options
  • Select an option

  • Save berekuk/2845009 to your computer and use it in GitHub Desktop.

Select an option

Save berekuk/2845009 to your computer and use it in GitHub Desktop.
Test::Deep::This
use strict;
use Test::More;
use Test::Deep::This;
use Test::Deep;
cmp_deeply(
[5, 4],
[abs (this - 4) < 2, 10 - sqrt(this) < this * 2]
);
done_testing;
__END__
Output:
not ok 1
# Failed test at -e line 1.
# Compared $data->[1]
# got : '4'
# expect : ((10) - (sqrt (<<this>>))) < ((<<this>>) * (2))
1..1
# Looks like you failed 1 test of 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment