Use magic header on objects to improve disclaim_test
authorPetter Urkedal <paurkedal@gmail.com>
Mon, 19 May 2014 20:36:55 +0000 (22:36 +0200)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 31 May 2014 08:35:26 +0000 (12:35 +0400)
commit7b0be4885117b95a169274fd922680eb20d43ce8
treefc76e8d325463e9fa62f108d56457c1ed5a9b0ed
parent57cc0490bad1dd1699662f2f9002012226fefc87
Use magic header on objects to improve disclaim_test

* tests/disclaim_test.c (my_assert): Call fflush().
* tests/disclaim_test.c (pair_s): Replace is_valid with "magic" field.
* tests/disclaim_test.c (pair_magic): New const static variable.
* tests/disclaim_test.c (is_pair): New function.
* tests/disclaim_test.c (pair_dct, pair_new): Set "magic" field and
use is_pair() instead of is_valid for assertion checking.
tests/disclaim_test.c