Changes between Initial Version and Version 1 of Ticket #715
- Timestamp:
- 2017-11-23T09:24:42Z (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #715 – Description
initial v1 1 1 PCUT assertion macros that test for equality require the use of Yoda comaprisons, essentially: 2 2 3 {{{ 3 4 PCUT_ASSERT_[INT_]EQUALS(expected, actual) 5 }}} 4 6 5 7 while if writing tests manually with == operator one would typically write 6 8 7 assert(actual == expected) 9 {{{ 10 assert(actual == expected); 11 }}} 8 12 9 13 e.g. 10 14 15 {{{ 11 16 assert(rc == EOK) 17 }}} 12 18 13 19 vs. 14 20 21 {{{ 15 22 PCUT_ASSERT_ERRNO_VAL(EOK, rc) 16 23 PCUT_ASSERT_INT_EQUALS(0, list_count(xyz)) 24 }}} 17 25 18 This is, at least for me, something very unnatural that I have to keep thinking about when writing tests .26 This is, at least for me, something very unnatural that I have to keep thinking about when writing tests, consuming precious mental energy.