SetVariable.java revision 829:b06c29386f63
192654Sjeff/* 2103623Sjeff * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. 392654Sjeff * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 492654Sjeff * 592654Sjeff * This code is free software; you can redistribute it and/or modify it 692654Sjeff * under the terms of the GNU General Public License version 2 only, as 792654Sjeff * published by the Free Software Foundation. Sun designates this 892654Sjeff * particular file as subject to the "Classpath" exception as provided 992654Sjeff * by Sun in the LICENSE file that accompanied this code. 1092654Sjeff * 1192654Sjeff * This code is distributed in the hope that it will be useful, but WITHOUT 1292654Sjeff * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1392654Sjeff * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1492654Sjeff * version 2 for more details (a copy is included in the LICENSE file that 1592654Sjeff * accompanied this code). 1692654Sjeff * 1792654Sjeff * You should have received a copy of the GNU General Public License version 1892654Sjeff * 2 along with this work; if not, write to the Free Software Foundation, 1992654Sjeff * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2092654Sjeff * 2192654Sjeff * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 2292654Sjeff * CA 95054 USA or visit www.sun.com if you need additional information or 2392654Sjeff * have any questions. 2492654Sjeff */ 2592654Sjeff 2692654Sjeff/* @test 2792654Sjeff @summary Test ModelIdentifier setVariable method */ 2892654Sjeff 2992654Sjeffimport java.io.File; 3092654Sjeffimport java.io.FileOutputStream; 3192654Sjeffimport java.io.IOException; 3292654Sjeff 3392654Sjeffimport javax.sound.sampled.*; 3492654Sjeff 3592654Sjeffimport com.sun.media.sound.*; 3692654Sjeff 3792654Sjeffpublic class SetVariable { 3892654Sjeff 3992654Sjeff public static void main(String[] args) throws Exception { 4092654Sjeff ModelIdentifier id = new ModelIdentifier("test","a",1); 4192654Sjeff id.setVariable("b"); 4292654Sjeff if(!id.getVariable().equals("b")) 4392654Sjeff throw new RuntimeException("id.getVariable() does't return \"b\"!"); 4492654Sjeff } 4592654Sjeff} 4692654Sjeff