Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 22 months ago

Last modified 12 months ago

#715 closed enhancement

Pcut requires the use of Yoda comparisons — at Initial Version

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone:
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:


PCUT assertion macros that test for equality require the use of Yoda comaprisons, essentially:

PCUT_ASSERT_[INT_]EQUALS(expected, actual)

while if writing tests manually with == operator one would typically write

assert(actual == expected)


assert(rc == EOK)


PCUT_ASSERT_INT_EQUALS(0, list_count(xyz))

This is, at least for me, something very unnatural that I have to keep thinking about when writing tests.

Change History (0)

Note: See TracTickets for help on using tickets.