Mercurial > hg > pulseaudio
changeset 173:6ac2c3df7588
2008-10-08 Omair Majid <omajid@redhat.com>
* unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
(testHasADefaultFormat): Also check that the line can be opened with the
default format.
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Wed, 08 Oct 2008 13:57:49 -0400 |
parents | 0a46fbaa018e |
children | 4e6c0e204d29 |
files | unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java Wed Oct 08 12:30:00 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java Wed Oct 08 13:57:49 2008 -0400 @@ -37,8 +37,6 @@ package org.classpath.icedtea.pulseaudio; -import static org.junit.Assert.assertNotNull; - import java.io.File; import java.io.IOException; import java.net.UnknownHostException; @@ -138,9 +136,9 @@ selectedMixerInfo = info; } } - assertNotNull(selectedMixerInfo); + Assert.assertNotNull(selectedMixerInfo); mixer = AudioSystem.getMixer(selectedMixerInfo); - assertNotNull(mixer); + Assert.assertNotNull(mixer); if (mixer.isOpen()) { mixer.close(); } @@ -1029,11 +1027,21 @@ @Test public void testHasADefaultFormat() throws LineUnavailableException { + System.out.println("This test checks that a SourceDataLine has " + + " a default format, and it can be opened with" + + " that format"); + sourceDataLine = (SourceDataLine) mixer.getLine(new Line.Info( SourceDataLine.class)); + + /* check that there is a default format */ Assert.assertNotNull(sourceDataLine.getFormat()); System.out.println(sourceDataLine.getFormat()); + /* check that the line can be opened with the default format */ + sourceDataLine.open(); + sourceDataLine.close(); + } @Test