unit: use g_assert_cmpint() and g_assert_cmpuint()

Comparisons of simple values should use test macros instead of checking
standard library call return value.  This prints more information on
failure - the actual values used for comparisons.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
3 files changed