Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / usr / src / cmd / dtrace / test / tst / common / predicates / tst.complex.d
blobd08543f060137724e17dbcc9a64009b8e8ea6808
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
30 * ASSERTION:
31 * Complex operations and if,then test.
32 * Call 'n' permutation and combination of operations over if,then.
33 * Match expected output in tst.complex.d.out
35 * SECTION: Program Structure/Predicates
39 #pragma D option quiet
41 BEGIN
43 i = 0;
44 j = 0;
47 tick-10ms
48 /i < 10/
50 i++;
51 j++;
52 printf("\n\n%d\n------\n", i);
55 tick-10ms
56 /i == 5 || i == 10/
58 printf("i == 5 (or) i == 10\n");
61 tick-10ms
62 /i <= 5/
64 printf("i <= 5\n");
67 tick-10ms
68 /j >= 5/
70 printf("j >= 5\n");
73 tick-10ms
74 /j >= 5 || i <= 5/
76 printf("i >= 5 || j >= 5\n");
79 tick-10ms
80 /j >= 5 && i <= 5/
82 printf("j >= 5 && i <= 55\n");
85 tick-10ms
86 /i < 5/
88 printf("i < 5\n");
91 tick-10ms
92 /i == 2 || j == 2/
94 printf("i == 2 (or) j == 2\n");
97 tick-10ms
98 /i == 2 && j == 2/
100 printf("i == 2 (and) j == 2\n");
103 tick-10ms
104 /j != 10/
106 printf("j != 10\n");
109 tick-10ms
110 /j == 5 || i == 2/
112 printf("j == 5 || i == 2\n");
115 tick-10ms
116 /j == 5 && i == 2/
118 printf("j == 5 && i == 2\n");
121 tick-10ms
122 /i == 10/
124 printf("i == 10\n");
125 exit(0);