Skip to content

Commit

Permalink
Added a test for itdelatrisu#89
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffan Byrne committed Jan 22, 2017
1 parent f34732f commit ccf935b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/test/java/itdelatrius/opsu/MultiClipTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package itdelatrius.opsu;

import java.io.IOException;
import java.net.URL;

import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;

import org.junit.Test;
import org.newdawn.slick.util.ResourceLoader;

import itdelatrisu.opsu.audio.MultiClip;

public class MultiClipTest {

@Test
public void multiClipCanBeCreated() throws UnsupportedAudioFileException, IOException, LineUnavailableException {
// test to catch issue with creating clips on linux.
URL url = ResourceLoader.getResource("applause.wav");
AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);
MultiClip clip = new MultiClip("test", audioIn);
clip.destroy();
}

}

0 comments on commit ccf935b

Please sign in to comment.