Open MaJeg opened 5 years ago
I encountered a similar problem within this test and it seems to be caused by the locale settings. It expects that the decimal seperator is a .
but for certain locales it is ,
.
I quick fixed this locally by changing the test in BitHistory
in
@Test
public void testPFormatArray() {
BitHistory history = new BitHistory(null, 1, 1);
Method m = null;
try {
m = BitHistory.class.getDeclaredMethod("pFormatArray", new Class[] {double[].class});
m.setAccessible(true);
double[] da = { 2.0, 4.0 };
String output = (String)m.invoke(history, da);
// Correct for locale
DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance();
char decimalSeparator = symbols.getDecimalSeparator();
assertEquals("[ 2" +decimalSeparator + "00 4" + decimalSeparator + "00 ]", output);
}catch(Exception e) {
e.printStackTrace();
}
}
ps: saw just that there is already a pull request for fixing this issue: https://github.com/numenta/htm.java/pull/536
I cloned the git repository with git clone https://github.com/numenta/htm.java.git Then, when running gradle -Pskipbench check, I have two failed tests :
I tested with java 8 and java 11 it didn't change anything, I have Ubuntu 18.04.