File: class11.bsh

package info (click to toggle)
bsh 2.0b4-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 4,072 kB
  • ctags: 3,680
  • sloc: java: 23,424; xml: 4,484; sh: 134; makefile: 21
file content (32 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
source("TestHarness.bsh");

// same as 10 but in a package

package booga2;

class Foo10
{
	Bar10 myBar;

	// random instance stuff
	assert( this instanceof booga2.Foo10 );
	assert( Foo10.Bar10 instanceof bsh.ClassIdentifier );
	assert( Bar10 instanceof bsh.ClassIdentifier );

	static class Bar10 { }

	void go() {
		myBar = new Bar10();
		assert( myBar instanceof Bar10 );
	}
}


f=new Foo10();
assert( f instanceof booga2.Foo10 );
f.go();
// this is a strange case... we don't recurse namespace for explicit imports
//assert( f.myBar instanceof Foo10.Bar10 );
assert( f.myBar instanceof booga2.Foo10.Bar10 );

complete();