tst.lquantize.d revision 178476
111819Sjulian/* 211819Sjulian * CDDL HEADER START 311819Sjulian * 411819Sjulian * The contents of this file are subject to the terms of the 511819Sjulian * Common Development and Distribution License (the "License"). 611819Sjulian * You may not use this file except in compliance with the License. 711819Sjulian * 811819Sjulian * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 911819Sjulian * or http://www.opensolaris.org/os/licensing. 1011819Sjulian * See the License for the specific language governing permissions 1111819Sjulian * and limitations under the License. 1211819Sjulian * 1311819Sjulian * When distributing Covered Code, include this CDDL HEADER in each 1411819Sjulian * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1511819Sjulian * If applicable, add the following below this CDDL HEADER, with the 1611819Sjulian * fields enclosed by brackets "[]" replaced with your own identifying 1711819Sjulian * information: Portions Copyright [yyyy] [name of copyright owner] 1811819Sjulian * 1911819Sjulian * CDDL HEADER END 2011819Sjulian */ 2111819Sjulian 2211819Sjulian/* 2311819Sjulian * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2411819Sjulian * Use is subject to license terms. 2511819Sjulian */ 2611819Sjulian 2711819Sjulian#pragma ident "%Z%%M% %I% %E% SMI" 2811819Sjulian 2911819Sjulian/* 3011819Sjulian * ASSERTION: 3111819Sjulian * Positive lquantize() test 3211819Sjulian * 3311819Sjulian * SECTION: Aggregations/Aggregations 3412057Sjulian * 3512057Sjulian * NOTES: This is verifiable simple positive test of the lquantize() function. 3612057Sjulian * 3711819Sjulian */ 3811819Sjulian 3911819Sjulian#pragma D option quiet 4011819Sjulian 4111819SjulianBEGIN 4211819Sjulian{ 4311819Sjulian i = 0; 4411819Sjulian} 4511819Sjulian 4611819Sjuliantick-10ms 4711819Sjulian/i < 1000/ 4811819Sjulian{ 4911819Sjulian @a[i] = lquantize(i, -100, 1100, 100 ); 5011819Sjulian i += 100; 5111819Sjulian} 5211819Sjulian 5311819Sjuliantick-10ms 5411819Sjulian/i == 1000/ 5511819Sjulian{ 5611819Sjulian exit(0); 5711819Sjulian} 5811819Sjulian