xref: /illumos-gate/usr/src/cmd/dtrace/test/tst/common/printf/tst.signs.d (revision 8c69cc8fbe729fa7b091e901c4b50508ccc6bb33)
1 /*
2  * CDDL HEADER START
3  *
4  * This file and its contents are supplied under the terms of the
5  * Common Development and Distribution License ("CDDL"), version 1.0.
6  * You may only use this file in accordance with the terms of version
7  * 1.0 of the CDDL.
8  *
9  * A full copy of the text of the CDDL should have accompanied this
10  * source.  A copy of the CDDL is also available via the Internet at
11  * http://www.illumos.org/license/CDDL.
12  *
13  * CDDL HEADER END
14  */
15 
16 /*
17  * Copyright (c) 2012 by Delphix. All rights reserved.
18  */
19 
20 /*
21  * Check %d v. %i v. %u.
22  */
23 
24 #pragma D option quiet
25 
26 uint16_t x;
27 int16_t y;
28 
29 BEGIN
30 {
31 	x = 0xffffffff;
32 	y = 0xffffffff;
33 
34 	printf("%d %i %u\n", x, x, x);
35 	printf("%d %i %u\n", y, y, y);
36 
37 	exit(0);
38 }
39