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 Version 1

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

Description (last modified by Jiri Svoboda)

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, consuming precious mental energy.

Change History (1)

comment:1 Changed 22 months ago by Jiri Svoboda

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