SetVersion.java revision 829:b06c29386f63
1235426Sdelphij/* 2190225Srpaulo * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. 3190225Srpaulo * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4190225Srpaulo * 5190225Srpaulo * This code is free software; you can redistribute it and/or modify it 6190225Srpaulo * under the terms of the GNU General Public License version 2 only, as 7190225Srpaulo * published by the Free Software Foundation. Sun designates this 8190225Srpaulo * particular file as subject to the "Classpath" exception as provided 9190225Srpaulo * by Sun in the LICENSE file that accompanied this code. 10190225Srpaulo * 11190225Srpaulo * This code is distributed in the hope that it will be useful, but WITHOUT 12190225Srpaulo * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13190225Srpaulo * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14190225Srpaulo * version 2 for more details (a copy is included in the LICENSE file that 15190225Srpaulo * accompanied this code). 16190225Srpaulo * 17190225Srpaulo * You should have received a copy of the GNU General Public License version 18190225Srpaulo * 2 along with this work; if not, write to the Free Software Foundation, 19190225Srpaulo * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20190225Srpaulo * 21190225Srpaulo * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 22235426Sdelphij * CA 95054 USA or visit www.sun.com if you need additional information or 23190225Srpaulo * have any questions. 24190225Srpaulo */ 25190225Srpaulo 26190225Srpaulo/* @test 27190225Srpaulo @summary Test SimpleSoundbank setVersion method */ 28190225Srpaulo 29190225Srpauloimport javax.sound.sampled.*; 30190225Srpaulo 31190225Srpauloimport com.sun.media.sound.*; 32190225Srpaulo 33190225Srpaulopublic class SetVersion { 34190225Srpaulo 35190225Srpaulo private static void assertEquals(Object a, Object b) throws Exception 36190225Srpaulo { 37235426Sdelphij if(!a.equals(b)) 38190225Srpaulo throw new RuntimeException("assertEquals fails!"); 39190225Srpaulo } 40190225Srpaulo 41190225Srpaulo public static void main(String[] args) throws Exception { 42 SimpleSoundbank soundbank = new SimpleSoundbank(); 43 soundbank.setVersion("hello"); 44 assertEquals(soundbank.getVersion(), "hello"); 45 46 } 47} 48