
source("TestHarness.bsh");

class TestReturn {
	boolean getBoolean() { return true; }
	byte getByte() { return (byte)1; }
	long getLong() { return 42l; }
	float getFloat() { return 1.0f; }
	double getDouble() { return 4.2d; }
	Double getD() { return new Double(4.2d); }
}

tr= new TestReturn();
assert( tr.getBoolean() == true );

assert( tr.getByte() == 1 );
// peek at bsh.Primitive here to check type
print( tr.getByte().getType() == Byte.TYPE );

assert( tr.getFloat() == 1.0f );
assert( tr.getLong() == 42l );
assert( tr.getDouble() == 4.2d );

d = tr.getD();
assert( d instanceof Double );
assert( d.doubleValue() == 4.2d );

complete();
