-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #503 from cogmission/gradle_build_fix
Gradle build fix
- Loading branch information
Showing
7 changed files
with
181 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/test/java/org/numenta/nupic/datagen/ResourceLocatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.numenta.nupic.datagen; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertFalse; | ||
import static org.junit.Assert.assertNotNull; | ||
import static org.junit.Assert.fail; | ||
|
||
import java.net.URI; | ||
|
||
import org.junit.Test; | ||
|
||
|
||
public class ResourceLocatorTest { | ||
|
||
@Test | ||
public void testURICreation() { | ||
try { | ||
ResourceLocator.uri("."); | ||
fail(); | ||
}catch(Exception e) { | ||
assertEquals(IllegalStateException.class, e.getClass()); | ||
assertEquals(java.net.MalformedURLException.class, e.getCause().getClass()); | ||
} | ||
|
||
try { | ||
URI uri = ResourceLocator.uri("file:///."); | ||
assertNotNull(uri); | ||
|
||
assertFalse(uri.isOpaque()); | ||
}catch(Exception e) { | ||
fail(); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.numenta.nupic.util; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.Test; | ||
|
||
|
||
public class ConditionTest { | ||
|
||
@Test | ||
public void testRqwAdapterReturnsFalse() { | ||
Condition.Adapter<Object> adapter = new Condition.Adapter<>(); | ||
assertFalse(adapter.eval(1.0d)); | ||
assertFalse(adapter.eval(1)); | ||
assertFalse(adapter.eval(new Object())); | ||
} | ||
|
||
} |