These are chat archives for Snaipe/Criterion

2nd
Jun 2016
Dominik
@kaidowei
Jun 02 2016 06:55
@Snaipe hi, how's it going?
I was just using cr_assert_str_eq(str, "something") and then thinking, that maybe we should add an implicit cr_assert_not_null(str) before that.
At the Moment, cr_assert_str_eq just crashes, which kinda confused me.
Franklin Mathieu
@Snaipe
Jun 02 2016 08:10
Hi, I'm fine, although flooded with school projects
Sure, that seems fair
Dominik
@kaidowei
Jun 02 2016 08:11
okay, are you doing that or should I?
Franklin Mathieu
@Snaipe
Jun 02 2016 08:11
Go ahead
I'll be resuming work on criterion fully in about a month, can't find the time to do so otherwise :/
Dominik
@kaidowei
Jun 02 2016 08:11
do you have any recommendations?
Franklin Mathieu
@Snaipe
Jun 02 2016 08:12
None that I can think of
Dominik
@kaidowei
Jun 02 2016 08:12
aww, too bad. But yeah, I didn't find any time either...
mkay, thanks
Dominik
@kaidowei
Jun 02 2016 12:19
@Snaipe while I'm at it - I'm printing the content of string assertions
[----] test.c:12: Assertion failed: expected (`hello`) is not empty.
[----] test.c:13: Assertion failed: The expression (as strings) (actual) == (expected) is false: actual=`hallo` expected=`hello`.
is that okay or do you want another format?
Dominik
@kaidowei
Jun 02 2016 12:54
btw. this time, I had to export PYTHON_BIN=python2to make cram work
Dominik
@kaidowei
Jun 02 2016 13:20
yeah well... export PYTHON_BIN=python3.4 works correctly.... grr
Franklin Mathieu
@Snaipe
Jun 02 2016 14:28
Actually it might require a little bit more work
because now the assert sends, in fact, two assertions back to the runner
stats-wise it should be only 1
I would recommend that you implement a wrapper over strcmp that handles NULL correctly
and use it as the basis of comparison for assert_str_eq
As for the new format, it seems fair, although a bit unfortunate when string literals are passed