GetPropertyInfo.java revision 8729:0242fce0f717
1121934Sharti/* 2121934Sharti * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. 3121934Sharti * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4121934Sharti * 5121934Sharti * This code is free software; you can redistribute it and/or modify it 6121934Sharti * under the terms of the GNU General Public License version 2 only, as 7121934Sharti * published by the Free Software Foundation. 8121934Sharti * 9121934Sharti * This code is distributed in the hope that it will be useful, but WITHOUT 10121934Sharti * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11121934Sharti * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12121934Sharti * version 2 for more details (a copy is included in the LICENSE file that 13121934Sharti * accompanied this code). 14121934Sharti * 15121934Sharti * You should have received a copy of the GNU General Public License version 16121934Sharti * 2 along with this work; if not, write to the Free Software Foundation, 17121934Sharti * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18121934Sharti * 19121934Sharti * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20121934Sharti * or visit www.oracle.com if you need additional information or have any 21121934Sharti * questions. 22121934Sharti */ 23121934Sharti 24121934Sharti/* @test 25121934Sharti @summary Test SoftAudioSynthesizer getPropertyInfo method */ 26121934Sharti 27121934Shartiimport javax.sound.midi.Patch; 28121934Shartiimport javax.sound.sampled.*; 29131826Sharti 30121934Shartiimport com.sun.media.sound.*; 31121934Sharti 32121934Shartipublic class GetPropertyInfo { 33121934Sharti 34121934Sharti private static void assertEquals(Object a, Object b) throws Exception 35121934Sharti { 36121934Sharti if(!a.equals(b)) 37121934Sharti throw new RuntimeException("assertEquals fails!"); 38121934Sharti } 39121934Sharti 40121934Sharti private static void assertTrue(boolean value) throws Exception 41121934Sharti { 42121934Sharti if(!value) 43 throw new RuntimeException("assertTrue fails!"); 44 } 45 46 public static void main(String[] args) throws Exception { 47 AudioSynthesizer synth = new SoftSynthesizer(); 48 AudioSynthesizerPropertyInfo[] info = synth.getPropertyInfo(null); 49 assertTrue(info != null); 50 } 51} 52