Merge pull request #3 from jsrobson10/master
Make the dev branch up-to-date with master
This commit is contained in:
commit
7fb412a48c
|
@ -252,8 +252,8 @@ for comments.
|
|||
"doubleArray": double (
|
||||
42.5D, -20D, 400D,
|
||||
NaND, -InfinityD, InfinityD,
|
||||
5.3e-200F, 4e+500F, 2.2e200F,
|
||||
)
|
||||
5.3e-200D, 4e+120D, 2.2e200D,
|
||||
),
|
||||
|
||||
/*
|
||||
Arrays are enclosed by an opening
|
||||
|
|
|
@ -240,7 +240,7 @@ public class BdfObject implements IBdfType
|
|||
if(ptr.isNext("true"))
|
||||
{
|
||||
if(type != BdfTypes.ARRAY_BOOLEAN) {
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr);
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr.getPointer(-4));
|
||||
}
|
||||
|
||||
boolean[] a = (boolean[]) array;
|
||||
|
@ -250,7 +250,7 @@ public class BdfObject implements IBdfType
|
|||
else if(ptr.isNext("false"))
|
||||
{
|
||||
if(type != BdfTypes.ARRAY_BOOLEAN) {
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr);
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr.getPointer(-5));
|
||||
}
|
||||
|
||||
boolean[] a = (boolean[]) array;
|
||||
|
@ -260,7 +260,7 @@ public class BdfObject implements IBdfType
|
|||
else if(ptr.isNext("infinityd"))
|
||||
{
|
||||
if(type != BdfTypes.ARRAY_DOUBLE) {
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr);
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr.getPointer(-9));
|
||||
}
|
||||
|
||||
double[] a = (double[]) array;
|
||||
|
@ -270,7 +270,7 @@ public class BdfObject implements IBdfType
|
|||
else if(ptr.isNext("-infinityd"))
|
||||
{
|
||||
if(type != BdfTypes.ARRAY_DOUBLE) {
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr);
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr.getPointer(-10));
|
||||
}
|
||||
|
||||
double[] a = (double[]) array;
|
||||
|
@ -280,7 +280,7 @@ public class BdfObject implements IBdfType
|
|||
else if(ptr.isNext("nand"))
|
||||
{
|
||||
if(type != BdfTypes.ARRAY_DOUBLE) {
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr);
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr.getPointer(-4));
|
||||
}
|
||||
|
||||
double[] a = (double[]) array;
|
||||
|
@ -290,7 +290,7 @@ public class BdfObject implements IBdfType
|
|||
else if(ptr.isNext("infinityf"))
|
||||
{
|
||||
if(type != BdfTypes.ARRAY_FLOAT) {
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr);
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr.getPointer(-9));
|
||||
}
|
||||
|
||||
float[] a = (float[]) array;
|
||||
|
@ -300,7 +300,7 @@ public class BdfObject implements IBdfType
|
|||
else if(ptr.isNext("-infinityf"))
|
||||
{
|
||||
if(type != BdfTypes.ARRAY_FLOAT) {
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr);
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr.getPointer(-10));
|
||||
}
|
||||
|
||||
float[] a = (float[]) array;
|
||||
|
@ -310,7 +310,7 @@ public class BdfObject implements IBdfType
|
|||
else if(ptr.isNext("nanf"))
|
||||
{
|
||||
if(type != BdfTypes.ARRAY_FLOAT) {
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr);
|
||||
throw BdfError.createError(BdfError.ERROR_SYNTAX, ptr.getPointer(-4));
|
||||
}
|
||||
|
||||
float[] a = (float[]) array;
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.io.IOException;
|
|||
|
||||
import bdf.data.IBdfDatabase;
|
||||
import bdf.types.BdfReader;
|
||||
import bdf.types.BdfReaderHuman;
|
||||
|
||||
public class Tests
|
||||
{
|
||||
|
@ -29,28 +30,7 @@ public class Tests
|
|||
|
||||
public static void main(String[] args) throws IOException
|
||||
{
|
||||
@SuppressWarnings("resource")
|
||||
FileInputStream rand = new FileInputStream("/dev/urandom");
|
||||
byte[] buffer = new byte[100];
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
long done = 0;
|
||||
int i = 0;
|
||||
|
||||
for(;;)
|
||||
{
|
||||
if(System.currentTimeMillis() - start > 1000) {
|
||||
System.out.println("" + i + ": " + done);
|
||||
start += 1000;
|
||||
done = 0;
|
||||
i += 1;
|
||||
}
|
||||
|
||||
done += 1;
|
||||
|
||||
rand.read(buffer);
|
||||
new BdfReader(buffer);
|
||||
}
|
||||
new BdfReaderHuman("int(NaND)");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue