SetInstance.java revision 12278:6fb5ee377870
144743Smarkm/* 244743Smarkm * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. 344743Smarkm * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 444743Smarkm * 544743Smarkm * This code is free software; you can redistribute it and/or modify it 644743Smarkm * under the terms of the GNU General Public License version 2 only, as 744743Smarkm * published by the Free Software Foundation. 844743Smarkm * 944743Smarkm * This code is distributed in the hope that it will be useful, but WITHOUT 1044743Smarkm * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1144743Smarkm * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1244743Smarkm * version 2 for more details (a copy is included in the LICENSE file that 1344743Smarkm * accompanied this code). 1444743Smarkm * 1544743Smarkm * You should have received a copy of the GNU General Public License version 1644743Smarkm * 2 along with this work; if not, write to the Free Software Foundation, 1744743Smarkm * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1844743Smarkm * 1944743Smarkm * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2044743Smarkm * or visit www.oracle.com if you need additional information or have any 2144743Smarkm * questions. 2244743Smarkm */ 2344743Smarkm 2444743Smarkm/* @test 2544743Smarkm @summary Test ModelIdentifier setInstance method 2644743Smarkm @modules java.desktop/com.sun.media.sound 2744743Smarkm*/ 2844743Smarkm 2944743Smarkmimport java.io.File; 3044743Smarkmimport java.io.FileOutputStream; 3144743Smarkmimport java.io.IOException; 3244743Smarkm 3344743Smarkmimport javax.sound.sampled.*; 3444743Smarkm 3544743Smarkmimport com.sun.media.sound.*; 3644743Smarkm 3744743Smarkmpublic class SetInstance { 3844743Smarkm 3944743Smarkm public static void main(String[] args) throws Exception { 4044743Smarkm ModelIdentifier id = new ModelIdentifier("test","a",1); 4144743Smarkm id.setInstance(2); 4244743Smarkm if(id.getInstance() != 2) 4344743Smarkm throw new RuntimeException("id.getInstance() doesn't return 2!"); 4444743Smarkm } 4544743Smarkm} 4644743Smarkm