SetSelfNonExclusive.java revision 8729:0242fce0f717
122347Spst/*
222347Spst * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
329964Sache * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
492906Smarkm *
592906Smarkm * This code is free software; you can redistribute it and/or modify it
622347Spst * under the terms of the GNU General Public License version 2 only, as
722347Spst * published by the Free Software Foundation.
822347Spst *
922347Spst * This code is distributed in the hope that it will be useful, but WITHOUT
1022347Spst * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1122347Spst * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1222347Spst * version 2 for more details (a copy is included in the LICENSE file that
1322347Spst * accompanied this code).
1422347Spst *
1522347Spst * You should have received a copy of the GNU General Public License version
1622347Spst * 2 along with this work; if not, write to the Free Software Foundation,
1722347Spst * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1822347Spst *
1922347Spst * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2092906Smarkm * or visit www.oracle.com if you need additional information or have any
2122347Spst * questions.
2222347Spst */
2322347Spst
2492906Smarkm/* @test
2522347Spst   @summary Test ModelPerformer setSelfNonExclusive method */
2622347Spst
2722347Spstimport java.io.File;
2822347Spstimport java.io.FileOutputStream;
2922347Spstimport java.io.IOException;
3022347Spst
3122347Spstimport javax.sound.sampled.*;
3222347Spst
3322347Spstimport com.sun.media.sound.*;
3422347Spst
3522347Spstpublic class SetSelfNonExclusive {
3622347Spst
37    public static void main(String[] args) throws Exception {
38        ModelPerformer performer = new ModelPerformer();
39        performer.setSelfNonExclusive(true);
40        if(performer.isSelfNonExclusive() != true)
41            throw new RuntimeException("performer.isSelfNonExclusive() didn't return true!");
42        performer.setSelfNonExclusive(false);
43        if(performer.isSelfNonExclusive() != false)
44            throw new RuntimeException("performer.isSelfNonExclusive() didn't return false!");
45    }
46}
47