malsyned / pfstest

Professional Firmware Services Unit Test Framework
Other
1 stars 0 forks source link

Matcher parity with Unity #29

Open malsyned opened 6 years ago

malsyned commented 6 years ago

Mostly this is about floating point matching and one-dimensional arrays for built-in types, I think.

malsyned commented 6 years ago

equal ints, various sizes equal uints, various sizes equal uints with hex printing, various sizes not equal whether certain bits are set, cleared, or equal to a mask in another int greater than, various integer sizes, signednesses, and hexnesses less than, various integer sizes, signednesses, and hexnesses within, various integer sizes, signednesses, and hexnesses equal pointers equal strings equal snstrings equal memory equal int arrays, various sizes, signednesses, and hexnesses equal pointer arrays equal string arrays equal memory arrays arrays where all elements match an int of various sizes, signednesses, and hexnesses arrays where all elements match a pointer arrays where all elements match a string arrays where all elements match a memory buffer

within, floats (printing should include +/- inf, NaN) array of floats within

within, doubles array of doubles within

malsyned commented 6 years ago

Maybe we want to implement some wrapper functions to get the convenience of Unity in simple assertions? Like

assert_equal_hex16(expected, actual);
/* => */ assert_that("", as_hex(the_u16(actual)), is(as_hex(the_u16(expected))));