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

Changes between Initial Version and Version 1 of Ticket #715


Ignore:
Timestamp:
2017-11-23T09:24:42Z (2 years ago)
Author:
Jiri Svoboda
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #715 – Description

    initial v1  
    11PCUT assertion macros that test for equality require the use of Yoda comaprisons, essentially:
    22
     3{{{
    34PCUT_ASSERT_[INT_]EQUALS(expected, actual)
     5}}}
    46
    57while if writing tests manually with == operator one would typically write
    68
    7 assert(actual == expected)
     9{{{
     10assert(actual == expected);
     11}}}
    812
    913e.g.
    1014
     15{{{
    1116assert(rc == EOK)
     17}}}
    1218
    1319vs.
    1420
     21{{{
    1522PCUT_ASSERT_ERRNO_VAL(EOK, rc)
    1623PCUT_ASSERT_INT_EQUALS(0, list_count(xyz))
     24}}}
    1725
    18 This is, at least for me, something very unnatural that I have to keep thinking about when writing tests.
     26This is, at least for me, something very unnatural that I have to keep thinking about when writing tests, consuming precious mental energy.