Permalink
Browse files

Used the new OSHelper class to not run certain tests that have no way…

… to pass on OS X since they rely on 3rd-party tools that don't work on OS X.
  • Loading branch information...
1 parent c880742 commit c6b26863f28cc73c26f3e71c1ebabcfe5611eece @myronmarston committed Nov 19, 2008
@@ -54,6 +54,9 @@ public void useTempFile(String tempFileName) throws Exception {
@Test
public void saveMp3File() throws Exception {
+ // I haven't found a way to install tritonus on OS X...
+ if (OSHelper.isMacOSX()) return;
+
final FractalPiece fp = new FractalPiece();
fp.setGermString("G4 A4");
@@ -81,9 +81,12 @@ public void useTempFile(String tempFileName) throws Exception {
@Test
public void testGuidoError() throws Exception {
- final OutputManager om = new OutputManager(this.outputManager.getFractalPiece(), this.outputManager.getNoteLists(), false, false, false);
- om.setTestNotationError(true);
- FileHelper.createAndUseTempFile("TestGif", ".gif", new FileHelper.TempFileUser() {
+ // Guido can only run on windows...
+ if (OSHelper.isMacOSX()) return;
+
+ final OutputManager om = new OutputManager(this.outputManager.getFractalPiece(), this.outputManager.getNoteLists(), false, false, false);
+ om.setTestNotationError(true);
+ FileHelper.createAndUseTempFile("TestGif", ".gif", new FileHelper.TempFileUser() {
public void useTempFile(String tempFileName) throws Exception {
try {
om.saveGifImage(tempFileName);
@@ -185,6 +188,9 @@ public void useTempFile(String tempFileName) throws Exception {
@Test
public void saveGifImage() throws Exception {
+ // Guido can only run on windows...
+ if (OSHelper.isMacOSX()) return;
+
FileHelper.createAndUseTempFile("TestGifFile", ".gif", new FileHelper.TempFileUser() {
public void useTempFile(String tempFileName) throws Exception {
OutputManagerTest.this.outputManager.saveGifImage(tempFileName);
@@ -301,14 +307,25 @@ public void tempoIsCached() throws Exception {
@Test
public void testLastFileNameMethods() throws Exception {
- testALastFileNameMethod("GifTest", ".gif", new OutputManagerTest.LastFileName() {
+ if (!OSHelper.isMacOSX()) {
+ testALastFileNameMethod("GifTest", ".gif", new OutputManagerTest.LastFileName() {
+ public String getLastFileName() throws Exception {
+ return outputManager.getLastGifFileName();
+ }
+ public void saveFile(String fileName) throws Exception {
+ outputManager.saveGifImage(fileName);
+ }
+ });
+
+ testALastFileNameMethod("Mp3Test", ".mp3", new OutputManagerTest.LastFileName() {
public String getLastFileName() throws Exception {
- return outputManager.getLastGifFileName();
+ return outputManager.getLastMp3FileName();
}
public void saveFile(String fileName) throws Exception {
- outputManager.saveGifImage(fileName);
+ outputManager.saveMp3File(fileName);
}
});
+ }
testALastFileNameMethod("GmnTest", ".gmn", new OutputManagerTest.LastFileName() {
public String getLastFileName() throws Exception {
@@ -335,15 +352,6 @@ public String getLastFileName() throws Exception {
public void saveFile(String fileName) throws Exception {
outputManager.saveWavFile(fileName);
}
- });
-
- testALastFileNameMethod("Mp3Test", ".mp3", new OutputManagerTest.LastFileName() {
- public String getLastFileName() throws Exception {
- return outputManager.getLastMp3FileName();
- }
- public void saveFile(String fileName) throws Exception {
- outputManager.saveMp3File(fileName);
- }
});
testALastFileNameMethod("LilypondPdf", ".pdf", new OutputManagerTest.LastFileName() {
@@ -411,12 +419,14 @@ public void useTempFile(String tempFileName) throws Exception {
om.savePngFile(tempFileName, 500);
}
});
-
- FileHelper.createAndUseTempFile("GuidoTest", ".gif", new FileHelper.TempFileUser() {
- public void useTempFile(String tempFileName) throws Exception {
- om.saveGifImage(tempFileName);
- }
- });
+
+ if (!OSHelper.isMacOSX()) {
+ FileHelper.createAndUseTempFile("GuidoTest", ".gif", new FileHelper.TempFileUser() {
+ public void useTempFile(String tempFileName) throws Exception {
+ om.saveGifImage(tempFileName);
+ }
+ });
+ }
}
@Test

0 comments on commit c6b2686

Please sign in to comment.