blob: 959ad075066052990e7f4f2c9eb3be2c15c1cf13 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST
void
libtest_expect_zeroed_on_free(int v)
{
libtest_expect_zeroed = v;
}
#else
int
main(void)
{
SET_UP_ALARM();
EXPECT(libtest_expect_zeroed == 0);
libtest_expect_zeroed_on_free(1);
EXPECT(libtest_expect_zeroed == 1);
libtest_expect_zeroed_on_free(0);
EXPECT(libtest_expect_zeroed == 0);
return 0;
}
#endif
|