Opened 8 years ago

Last modified 7 years ago

#737 new defect

some unittest macros behave wrong (double eval fix)

Reported by: westram Owned by: westram
Priority: major Milestone:
Component: global Version: SVN
Keywords: Cc:

Description (last modified by westram)

Status quo:

  • r15453 "fixed" a double evaluation problem for TEST_EXPECT_EQUAL__BROKEN
  • a similar problem exists for TEST_EXPECT_IN_RANGE

New problems introduced by "fix" r15453:

  • the expressions are not dumped as specified in client code (instead dump local variable names)
  • the dumped location is wrong (points to test_unit.h) (./) by [16355]

Might be solvable by introducing new methods, e.g.

  • is_broken_equal(want,got)
  • is_in_range(lower,upper)

These methods shall not return a match_expectation (as is_equal_to(...) does). Instead it could create an expectation_group or similar containing the 2 involved expectations and then use a special method instead of expect_broken()/expect_that().

Change History (1)

comment:1 Changed 7 years ago by westram

  • Description modified (diff)
Note: See TracTickets for help on using tickets.