marick/Midje — Issue #102: roughly inside a nested collection doesn't work
Author: beloglazov
Created: 2012-02-10 00:04:30+00:00
State: open

Hi,

I have a function that for a certain input returns the following data structure:

([-0.1 0.1 0.0]
[0.05 -0.10000000000000009 0.05]
[0.0 0.05 -0.05000000000000002])

As far as I understood from the documentation, 'just' should enable using checkers inside collections. So I do:

(just [-0.1 0.1 0.0]
[ 0.05 (roughly -0.1) 0.05]
[ 0.0 0.05 (roughly -0.05)])

However, the test fails, here is what I get:

Actual result did not agree with the checking function.
Actual result: ([-0.1 0.1 0.0] [0.05 -0.10000000000000009 0.05] [0.0 0.05 -0.05000000000000002])
Checking function: (just [-0.1 0.1 0.0] [0.05 (roughly -0.1) 0.05] [0.0 0.05 (roughly -0.05)])
The checker said this about the reason:
Best match found: [[-0.1 0.1 0.0]]

It that a bug or checkers are not supposed to work on deeper than the second level of nested collections?

Thanks,
Anton