#!/bin/java bsh.Interpreter

source("TestHarness.bsh");

foo( arg1, arg2 ) {
	print("arg1 = "+arg1);
	print("arg2 = "+arg2);
	5;
}

foo2( arg1 ) {
	return 52;
}

foo3( arg1 ) {
	52;
	return;
	print("return failed...");
}

myObject( arg1, arg2 ) {
	this.foo = arg1;
	this.bar = arg2;
	return this;
}

assert( foo("one", "two") == 5 );
assert( foo2("one") == 52 );
assert( foo3("one") == void );

obj = myObject("one", "two");
assert(obj.foo.equals("one") );
assert(obj.bar.equals("two") );

obj2 = myObject("three", "four");
assert(obj2.foo.equals("three") );
assert(obj2.bar.equals("four") );
// still
assert(obj.foo.equals("one") );
assert(obj.bar.equals("two") );

complete();
