Created
May 31, 2012 17:47
-
-
Save berekuk/2845009 to your computer and use it in GitHub Desktop.
Test::Deep::This
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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