Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ZenGarden.jar now includes PdObjectTest, which is a JUnit test suite …

…intended for all objects. Make file updated to include test suite and shell script added to run said suite using the included junit library.
  • Loading branch information...
commit 5d96aa28123f6d6c83f23ad5d3b50333e4428161 1 parent e7bd649
@mhroth authored
View
3  .gitignore
@@ -3,7 +3,6 @@
libs/Darwin-i386/*.dSYM
.DS_Store
bin
-ZenGarden.jardesc
.project
.classpath
Xcode/build
@@ -16,4 +15,4 @@ src/sndfile.h
Mersenne-1.1.zip
demo/
libs/
-*.jar
+ZenGarden.jar
View
BIN  junit-4.8.2.jar
Binary file not shown
View
3  runme-test.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+java -Djava.library.path=./libs/`./src/platform`/ -classpath ./ZenGarden.jar:./junit-4.8.2.jar org.junit.runner.JUnitCore me.rjdj.zengarden.PdObjectTest
View
5 src/Makefile
@@ -55,10 +55,11 @@ libzengarden: ../libs/$(OS)/libzengarden.$(SO_EXTENSION)
../libs/$(OS)/libzengarden.$(SO_EXTENSION): $(OBJS)
$(call MAKE_SO, $@, , $(OBJS))
-java-examplegarden: ../ZenGarden.jar
+java-jar: ../ZenGarden.jar
../ZenGarden.jar: me/rjdj/zengarden/*.java
- cd me/rjdj/zengarden/ && javac *.java
+ javac -classpath ../junit-4.8.2.jar ./me/rjdj/zengarden/*.java ../test/me/rjdj/zengarden/*.java
jar cfm ../ZenGarden.jar me/rjdj/zengarden/manifest me/rjdj/zengarden/*.class
+ cd ../test && jar uf ../ZenGarden.jar me/rjdj/zengarden/*.class
endif
View
2  src/Makefile.OS.Darwin-i386
@@ -1,4 +1,4 @@
-PLATFORM_TARGETS=libzengarden libzengarden-static libjnizengarden java-examplegarden
+PLATFORM_TARGETS=libzengarden libzengarden-static libjnizengarden java-jar
MAKE_SO=$(CC) -o $(1) $(CXXFLAGS) -dynamiclib \
-I`javaconfig Headers` \
$(2) $(3) $(SNDFILE_LIB) -lstdc++
View
2  src/Makefile.OS.Linux-i386
@@ -1,5 +1,5 @@
#SUPPORTED_PLATFORM=1
-PLATFORM_TARGETS=libzengarden libzengarden-static libjnizengarden java-examplegarden
+PLATFORM_TARGETS=libzengarden libzengarden-static libjnizengarden java-jar
MAKE_SO=$(CC) -o $(1) $(CXXFLAGS) -shared $(2) $(3) $(SNDFILE_LIB) -lstdc++
JNI_EXTENSION=so
SO_EXTENSION=so
View
6 test/me/rjdj/zengarden/PdObjectTest.java
@@ -22,9 +22,10 @@
package me.rjdj.zengarden;
-import org.junit.After;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -33,8 +34,6 @@
import java.io.FileReader;
import java.io.IOException;
-import me.rjdj.zengarden.ZenGarden;
-
/**
* This class is an test suite for all implemented objects.
*
@@ -61,6 +60,7 @@ public void setUp() throws Exception {
@After
public void tearDown() throws Exception {
+ // nothing to do
}
@Test
Please sign in to comment.
Something went wrong with that request. Please try again.