Menu

#23 @assertEqual(a,b) for more information than @assertTrue(a==b)

closed
1
2014-12-12
2014-08-15
No

Often I have user-defined types with an associated "==" operator.

I then do

@assertTrue(a == b)

but the failure message is not as useful as one might hope.

Ideally we could do something like

@assertEqual(a,b)

and the preprocessor can translate into the former, but with a slightly more informative message. Of course the preprocessor knows nothing about Fortran types, so we'd have to have a slightly different macro.

Something like:

@assertEqualUserDefined(a, b)

Failure message would be "Items not equal" or perhaps "<name_arg1> not equal to <name_arg2>".</name_arg2></name_arg1>

Discussion

  • Michael L. Rilee

    • Priority: 5 --> 4
     
  • Michael L. Rilee

    • Priority: 4 --> 1
     
  • Michael L. Rilee

    • status: open --> closed
     
  • Michael L. Rilee

    We have implemented @assertEqualUserDefined(a,b) and provided examples.

     

Log in to post a comment.

MongoDB Logo MongoDB