tst.lquantize.d revision 178476
1281SN/A/* 21188Sjoehw * CDDL HEADER START 3281SN/A * 4281SN/A * The contents of this file are subject to the terms of the 5649Sjoehw * Common Development and Distribution License (the "License"). 6649Sjoehw * You may not use this file except in compliance with the License. 7649Sjoehw * 8649Sjoehw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9649Sjoehw * or http://www.opensolaris.org/os/licensing. 10649Sjoehw * See the License for the specific language governing permissions 11281SN/A * and limitations under the License. 12281SN/A * 13281SN/A * When distributing Covered Code, include this CDDL HEADER in each 14281SN/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15281SN/A * If applicable, add the following below this CDDL HEADER, with the 16281SN/A * fields enclosed by brackets "[]" replaced with your own identifying 17281SN/A * information: Portions Copyright [yyyy] [name of copyright owner] 18281SN/A * 19281SN/A * CDDL HEADER END 20281SN/A */ 21281SN/A 22281SN/A/* 23281SN/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24281SN/A * Use is subject to license terms. 25281SN/A */ 26281SN/A 27281SN/A#pragma ident "%Z%%M% %I% %E% SMI" 28281SN/A 29281SN/A/* 30281SN/A * ASSERTION: 31281SN/A * Positive lquantize() test 32281SN/A * 33281SN/A * SECTION: Aggregations/Aggregations 34281SN/A * 35649Sjoehw * NOTES: This is verifiable simple positive test of the lquantize() function. 36281SN/A * 37281SN/A */ 38281SN/A 39281SN/A#pragma D option quiet 40281SN/A 41281SN/ABEGIN 42281SN/A{ 43281SN/A i = 0; 44281SN/A} 45281SN/A 46281SN/Atick-10ms 47281SN/A/i < 1000/ 48281SN/A{ 49281SN/A @a[i] = lquantize(i, -100, 1100, 100 ); 50281SN/A i += 100; 51281SN/A} 52281SN/A 53281SN/Atick-10ms 54281SN/A/i == 1000/ 55281SN/A{ 56281SN/A exit(0); 57281SN/A} 58281SN/A