tst.lquantize.d revision 178476
138494Sobrien/* 238494Sobrien * CDDL HEADER START 338494Sobrien * 438494Sobrien * The contents of this file are subject to the terms of the 538494Sobrien * Common Development and Distribution License (the "License"). 6174294Sobrien * You may not use this file except in compliance with the License. 738494Sobrien * 838494Sobrien * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 938494Sobrien * or http://www.opensolaris.org/os/licensing. 1038494Sobrien * See the License for the specific language governing permissions 1138494Sobrien * and limitations under the License. 1238494Sobrien * 1338494Sobrien * When distributing Covered Code, include this CDDL HEADER in each 1438494Sobrien * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1538494Sobrien * If applicable, add the following below this CDDL HEADER, with the 1638494Sobrien * fields enclosed by brackets "[]" replaced with your own identifying 1738494Sobrien * information: Portions Copyright [yyyy] [name of copyright owner] 1838494Sobrien * 1938494Sobrien * CDDL HEADER END 2038494Sobrien */ 2138494Sobrien 2238494Sobrien/* 2338494Sobrien * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2438494Sobrien * Use is subject to license terms. 2538494Sobrien */ 2638494Sobrien 2738494Sobrien#pragma ident "%Z%%M% %I% %E% SMI" 2838494Sobrien 2938494Sobrien/* 3038494Sobrien * ASSERTION: 3138494Sobrien * Positive lquantize() test 3238494Sobrien * 3338494Sobrien * SECTION: Aggregations/Aggregations 3438494Sobrien * 3538494Sobrien * NOTES: This is verifiable simple positive test of the lquantize() function. 3638494Sobrien * 3738494Sobrien */ 3838494Sobrien 3938494Sobrien#pragma D option quiet 4038494Sobrien 4138494SobrienBEGIN 4238494Sobrien{ 4338494Sobrien i = 0; 4438494Sobrien} 4538494Sobrien 46tick-10ms 47/i < 1000/ 48{ 49 @a[i] = lquantize(i, -100, 1100, 100 ); 50 i += 100; 51} 52 53tick-10ms 54/i == 1000/ 55{ 56 exit(0); 57} 58