Excellent; the best solutions are those that seem obvious once they're pointed out.

For my sort of (numerical applications), I'd still appreciate an easy way to test for value-within-tolerance, but with this information I can certainly solve my immediate problem.

Thanks,

Phil

On 07/10/2013 07:33, haifisch wrote:
Hi,

this is default C# behavior handling closures.

Just change your loop to store a local copy of the variable x and the test will run.

       for  (int  x = 0; x < 1000; x += 100)
       {
         int  x1 = x;
         call.Expect(c => c.Call(Arg<int>.Matches(p => p == x1)));
       }

As far as I can see there is no bug in RhinoMocks.
But if anyone might want to further improve the API for this kind of constraints - contributions to https://github.com/hibernating-rhinos/rhino-mocks/network or any other more advanced branch are always welcome.

Best regards,

Andreas

Am Samstag, 5. Oktober 2013 13:57:35 UTC+2 schrieb Phil Atkin:

    Sorry - which two methods on what class?  Are you saying that the
    behaviour of my examples would be different if the bug were fixed?

    On 05/10/2013 09:13, Alexander Fedin wrote:
    > It fails because of the bug in the Rhino Mocks code: the code
    tries to compile the expression by calling
    LambdaExpression.Compile method through the reflection and does
    not take in account that there are two methods with the same name
    on that class. Somebody should fix this annoying thing.
    >

--
You received this message because you are subscribed to a topic in the Google Groups "Rhino.Mocks" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/rhinomocks/_WoOlhrdaAg/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rhinomocks.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rhinomocks.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to