2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2013 (c) Joyent, Inc. All rights reserved.
17 * This test takes data from the current binary which is basically running in a
18 * loop between two functions and our goal is to have two unique types that they
19 * contain which we can print.
24 typedef struct zelda_info
{
32 has_princess(zelda_info_t
*z
)
34 return (z
->zi_haszelda
);
38 has_dungeons(zelda_info_t
*z
)
40 return (z
->zi_ndungeons
!= 0);
44 has_villain(zelda_info_t
*z
)
46 return (z
->zi_villain
);
56 oot
.zi_gamename
= "Ocarina of Time";
57 oot
.zi_ndungeons
= 10;
58 oot
.zi_villain
= "Ganondorf";
61 la
.zi_gamename
= "Link's Awakening";
63 la
.zi_villain
= "Nightmare";
66 lttp
.zi_gamename
= "A Link to the Past";
67 lttp
.zi_ndungeons
= 12;
68 lttp
.zi_villain
= "Ganon";
72 (void) has_princess(&oot
);
73 (void) has_dungeons(&la
);
74 (void) has_villain(<tp
);