lundi 6 juillet 2015

How to test within a precision using C-Green?

I need to test doubles in a unit test written using Cgreen. My comparison and generated values are very close, but assert_double_equal says

1.95 != 1.94887879

How can I tell Cgreen to test within a certain precision? This is close enough for me.

PS: Stackoverflow won't let me create a new tag for Cgreen, but I'm hoping some CUnit users have some experience using it.

Aucun commentaire:

Enregistrer un commentaire