head	1.50;
access;
symbols
	start:1.1.1.1 vendor:1.1.1;
locks; strict;
comment	@# @;


1.50
date	2002.02.13.22.25.01;	author tack;	state Exp;
branches;
next	1.49;

1.49
date	2001.08.19.21.55.51;	author tack;	state Exp;
branches;
next	1.48;

1.48
date	2001.08.17.03.04.23;	author tack;	state Exp;
branches;
next	1.47;

1.47
date	2001.08.17.02.40.54;	author tack;	state Exp;
branches;
next	1.46;

1.46
date	2001.08.16.17.33.29;	author tack;	state Exp;
branches;
next	1.45;

1.45
date	2001.08.14.01.04.23;	author tack;	state Exp;
branches;
next	1.44;

1.44
date	2001.08.12.00.23.21;	author tack;	state Exp;
branches;
next	1.43;

1.43
date	2001.07.21.19.00.36;	author tack;	state Exp;
branches;
next	1.42;

1.42
date	2001.06.10.20.53.16;	author tack;	state Exp;
branches;
next	1.41;

1.41
date	2001.06.07.23.22.47;	author tack;	state Exp;
branches;
next	1.40;

1.40
date	2001.06.05.03.13.36;	author tack;	state Exp;
branches;
next	1.39;

1.39
date	2001.06.04.23.49.08;	author tack;	state Exp;
branches;
next	1.38;

1.38
date	2001.06.04.03.26.46;	author tack;	state Exp;
branches;
next	1.37;

1.37
date	2001.06.03.20.52.33;	author tack;	state Exp;
branches;
next	1.36;

1.36
date	2001.06.03.01.46.46;	author tack;	state Exp;
branches;
next	1.35;

1.35
date	2001.05.28.19.36.26;	author tack;	state Exp;
branches;
next	1.34;

1.34
date	2001.05.28.19.33.12;	author tack;	state Exp;
branches;
next	1.33;

1.33
date	2001.05.28.04.33.58;	author tack;	state Exp;
branches;
next	1.32;

1.32
date	2001.05.27.23.03.57;	author tack;	state Exp;
branches;
next	1.31;

1.31
date	2001.05.25.21.37.48;	author tack;	state Exp;
branches;
next	1.30;

1.30
date	2001.05.25.04.22.36;	author tack;	state Exp;
branches;
next	1.29;

1.29
date	2001.05.24.18.07.32;	author tack;	state Exp;
branches;
next	1.28;

1.28
date	2001.05.24.02.28.21;	author tack;	state Exp;
branches;
next	1.27;

1.27
date	2001.05.24.01.07.05;	author tack;	state Exp;
branches;
next	1.26;

1.26
date	2001.05.23.20.41.44;	author tack;	state Exp;
branches;
next	1.25;

1.25
date	2001.05.23.20.20.00;	author tack;	state Exp;
branches;
next	1.24;

1.24
date	2001.05.23.20.12.30;	author tack;	state Exp;
branches;
next	1.23;

1.23
date	2001.05.21.03.37.56;	author tack;	state Exp;
branches;
next	1.22;

1.22
date	2001.05.21.02.19.16;	author tack;	state Exp;
branches;
next	1.21;

1.21
date	2001.05.17.17.28.03;	author tack;	state Exp;
branches;
next	1.20;

1.20
date	2001.05.16.13.10.45;	author tack;	state Exp;
branches;
next	1.19;

1.19
date	2001.05.10.02.37.46;	author tack;	state Exp;
branches;
next	1.18;

1.18
date	2001.05.10.02.36.49;	author tack;	state Exp;
branches;
next	1.17;

1.17
date	2001.05.08.21.49.00;	author tack;	state Exp;
branches;
next	1.16;

1.16
date	2001.04.12.04.31.50;	author tack;	state Exp;
branches;
next	1.15;

1.15
date	2001.04.12.00.37.13;	author tack;	state Exp;
branches;
next	1.14;

1.14
date	2001.04.02.16.19.09;	author tack;	state Exp;
branches;
next	1.13;

1.13
date	2001.04.02.16.03.44;	author tack;	state Exp;
branches;
next	1.12;

1.12
date	2001.04.02.01.07.31;	author tack;	state Exp;
branches;
next	1.11;

1.11
date	2001.03.29.13.05.13;	author tack;	state Exp;
branches;
next	1.10;

1.10
date	2001.03.29.00.20.24;	author tack;	state Exp;
branches;
next	1.9;

1.9
date	2001.01.27.23.23.35;	author lo-lan-do;	state Exp;
branches;
next	1.8;

1.8
date	2000.08.22.03.47.01;	author tack;	state Exp;
branches;
next	1.7;

1.7
date	2000.08.22.03.42.47;	author tack;	state Exp;
branches;
next	1.6;

1.6
date	2000.08.19.01.27.00;	author tack;	state Exp;
branches;
next	1.5;

1.5
date	2000.03.21.22.51.10;	author tack;	state Exp;
branches;
next	1.4;

1.4
date	2000.03.18.20.49.36;	author tack;	state Exp;
branches;
next	1.3;

1.3
date	2000.03.16.17.03.14;	author tack;	state Exp;
branches;
next	1.2;

1.2
date	2000.03.15.16.12.50;	author tack;	state Exp;
branches;
next	1.1;

1.1
date	2000.03.14.21.13.25;	author tack;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.03.14.21.13.25;	author tack;	state Exp;
branches;
next	;


desc
@@


1.50
log
@Bug fixes and union spec compliance
@
text
@#!/usr/bin/env python

# This test suite is deprecated and is basically used for quick tests.
# Look at test-suite/ and examples/ for something useful.

import CORBA
import sys
import Fruit, Fruit__POA

orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
ior = open("./test-server.ior").readline()
o = orb.string_to_object(ior)

#o.test_octseq( (0x31, 0x58, 0x68, 0x78, 0x78, 0x68) )
#o.test_octseq( "foobar")
#print map(ord, o.get_octseq())
#sys.exit(1)

try:
	o.add_fruit(Fruit.Properties(name = "orange", color = Fruit.orange))
	o.add_fruit(Fruit.Properties(name = "banana", color = Fruit.yellow))
	o.add_fruit(Fruit.Properties(name = "apple", color = Fruit.red))
	o.add_fruit(Fruit.Properties(name = "lime", color = Fruit.green))
except: pass

for fruit in o.fruit_list:
	print "%s is %s" % (fruit.name, Fruit.Color[fruit.color])

print o.fruit_list

i = o.get_instance(o.fruit_list[0])
print i
print "I've an instance of an", i.fruit.name
new_factory = i.get_factory() # test forward declaration
print "I created a new factory: ", new_factory
i.discard_factory(new_factory)
	
i.bite(50)
try: i.bite(60)
except Fruit.Instance.BigBite, exd:
	print "Got BigBite exception"
	try: i.bite(60 - exd.too_much_by)
	except Fruit.Instance.AllEaten:
		print "I'm done eating my %s; throwing it out" % i.fruit.name
		o.discard_instance(i)

print "Pi is", Fruit.Factory.pi
r = o.get_random_fruit()
print "Random fruit of the day: %s (at index %d)" % (r[1].name, r[0])
	
union = o.test_union(Fruit.yellow)
print "Testing union: discriminate:", union._d, "-- value:", union._v
print "Testing any:", o.test_any()

for i in range (6):
	print "Testing sequence of length "+str(i)+":", o.test_list(i)
# o.die()
@


1.49
log
@Rework of IDL operation return values in operation_skel
@
text
@d52 1
a52 1
print "Testing union: discriminate:", union.d, "-- value:", union.v
@


1.48
log
@Fix for octet sequences
@
text
@d3 3
a8 1
#import Bonobo
d14 4
a17 2
o.test_octseq( (0x31, 0x58, 0x68, 0x78, 0x78, 0x68) )
sys.exit(1)
d41 1
a47 1
print "Calling get_random_fruit"
a48 1
print "Back on get random" 
@


1.47
log
@Fix leaks
@
text
@a10 5
while 1:
	res = o.test_objseq()
#	res = []
#	for i in range(4):
#		res.append(o.test_inst())
d12 2
a13 11
#	o.clean_objseq(res)
	for z in res:
		o.clean_inst(z)
#	res = o.test_inst()
#	print res
#	o.clean_inst(res)
#	sys.exit(0)

#z = o.get_prop()
#print z
#o.set_prop(z)
@


1.46
log
@Return correct exceptions; map object seqs to strings
@
text
@d11 13
@


1.45
log
@Updates for pending 0.3.0 release
@
text
@d12 4
@


1.44
log
@Merged marshal typecode patch from Johan
@
text
@d6 1
a6 12
import Bonobo

tc = CORBA.TypeCode("IDL:Fruit/Factory/stringseq:1.0")
#any = CORBA.Any(tc, ["foo", "bar", "baz"])
tc = CORBA.TypeCode("IDL:CORBA/String:1.0")
print type(tc)
sys.exit(1)
any = CORBA.Any(tc, "blahblah")
print any
while 1:
	print CORBA._load_idl(any)
sys.exit(0)
a11 3
while 1:
	s = orb.object_to_string(o)

d47 1
a47 2
while 1:
	print "Testing any:", o.test_any()
@


1.43
log
@*** empty log message ***
@
text
@d6 1
d9 5
a13 2
import Bonobo
any = CORBA.Any(tc, ["foo", "bar", "baz"])
@


1.42
log
@find_repo_id_from_typecode handles basic types explicitly
@
text
@d7 1
a7 1
#tc = CORBA.TypeCode("IDL:Fruit/Factory/stringseq:1.0")
d9 1
a9 2
tc = CORBA.TypeCode("IDL:CORBA/String:1.0")
any = CORBA.Any(tc, "Foo")
d11 2
@


1.41
log
@Fix changelog
@
text
@d8 1
d10 4
@


1.40
log
@Implement PyORBit_Any_Get
@
text
@a8 7
any = CORBA.Any(tc, "foobar")
print any
while 1:
#	any = CORBA.Any(tc, ("Foo", "bar", "baz"))
	print CORBA._load_idl(any)
sys.exit(1)

d12 4
@


1.39
log
@Test suite corrections
@
text
@d7 9
a17 1
o = orb.string_to_object("foo")
@


1.38
log
@Resurrected POA::the_POAManager, fixed module names for stub idl classes, and created the echo example
@
text
@d9 1
@


1.37
log
@Implemented PyORBit_Any_New
@
text
@a6 3
print CORBA._load_idl("adf")
sys.exit(1)

@


1.36
log
@Fix segfault if ORB is not init'ed
@
text
@d7 3
@


1.35
log
@sync
@
text
@a7 1
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
@


1.34
log
@Attach ORB to objrefs
@
text
@a45 1

@


1.33
log
@Leak plugging
@
text
@d8 1
d28 2
d43 1
a43 1

d46 4
a49 1
print "Testing any:", o.test_any()
@


1.32
log
@Mass changes all over the place
@
text
@a16 1
print "Step 2"
a21 1
print "Step 3"
@


1.31
log
@Create CORBA.Object objects if IDL interface isn't known
@
text
@d5 1
a9 28
import Fruit, Fruit__POA
o = o._narrow(Fruit.Factory)
o.teststr = "foo"
print o
print o.teststr
sys.exit(1)
try:
	o.add_fruit(Fruit.Properties(name = "orange", color = Fruit.orange))
except: pass
fr = o.fruit_list[0]
print fr
i = o.get_instance(fr) #o.fruit_list[0])
print "Got instance", i
#print o.test_list(5)
#import time
#then = time.time()
#for i in range(0,1000):
#	o.test_list(5)
#
#print "Duration: ", time.time() - then

print o.__class__.__bases__[0] == CORBA.Object
#sys.exit(1)
#print o.foobar()
#print o.__repo_id
#print o._is_equivalent(o)
#print o._hash(12)
#print o._non_existent()
@


1.30
log
@More objref breakage.
@
text
@a4 1
import Fruit, Fruit__POA
d9 5
a13 4
print o.test_list(5)
o2 = o._narrow(Fruit.Instance)
print o2.get_factory()
print "equiv", o._is_equivalent(o2)
a17 2
print o.fruit_list
print o.get_instance
@


1.29
log
@More big breakage
@
text
@d10 14
d25 6
a30 6
import time
then = time.time()
for i in range(0,10000):
	o.test_list(5)

print "Duration: ", time.time() - then
d32 2
a33 1
sys.exit(1)
@


1.28
log
@Added CORBA_Object.*
@
text
@d5 1
a5 1
import Fruit
d10 8
a17 1
print o.foobar()
d19 5
a23 4
print o.__repo_id
print o._is_equivalent(o)
print o._hash(12)
print o._non_existent()
@


1.27
log
@Added spec file
@
text
@d10 2
@


1.26
log
@Implemented more CORBA object methods from section 1.6
@
text
@d13 1
a13 2
sys.exit(1)
print o, o.__repo_id
@


1.25
log
@*** empty log message ***
@
text
@d11 2
a12 1
print o._is_a("IDL:Fruit/Blah:1.0")
@


1.24
log
@CORBA.Object separation and added _is_a
@
text
@d11 1
a11 1
print o._is_a("IDL:Fruit/Factory:1.0")
@


1.23
log
@*** empty log message ***
@
text
@d10 3
a12 1

@


1.22
log
@Small fixes
@
text
@a9 2
print o.foobar()
sys.exit(1)
@


1.21
log
@Added _Get macros to API for Johan
@
text
@d10 2
@


1.20
log
@Commit these changes so I can work on them from work.
@
text
@a9 4
tc = CORBA.TypeCode(o)
print tc
#o.test_list("string")
##sys.exit(0)
@


1.19
log
@Clean up cruft from test suite
@
text
@d10 5
@


1.18
log
@Set ob_type on fixed, typecode, any, and client/server types.
@
text
@a22 1
o.foobar(o.fruit_list)
@


1.17
log
@Fixes for loading the same IDL more than once; hook __import__ after preprocessing IDL
@
text
@d22 3
@


1.16
log
@More exceptions commits
@
text
@a9 1
print o.bar
@


1.15
log
@Tons of exception updates
@
text
@d10 1
a10 3
print "Calling test"
#print o.test_list(4)
#sys.exit(1)
d12 6
a17 1
#try:
d19 1
a19 5
o.add_fruit(Fruit.Properties(name = "orange", color = Fruit.orange))
o.add_fruit(Fruit.Properties(name = "banana", color = Fruit.yellow))
o.add_fruit(Fruit.Properties(name = "apple", color = Fruit.red))
o.add_fruit(Fruit.Properties(name = "lime", color = Fruit.green))
#except: pass
d23 1
@


1.14
log
@*** empty log message ***
@
text
@d10 3
d14 7
a20 6
try:
	o.add_fruit(Fruit.Properties(name = "orange", color = Fruit.orange))
	o.add_fruit(Fruit.Properties(name = "banana", color = Fruit.yellow))
	o.add_fruit(Fruit.Properties(name = "apple", color = Fruit.red))
	o.add_fruit(Fruit.Properties(name = "lime", color = Fruit.green))
except: pass
@


1.13
log
@Fixed a couple segfaults
@
text
@a9 2
o.foo = o.test_any()
print o.foo
@


1.12
log
@Delegation fixes, code cleaning
@
text
@d10 2
@


1.11
log
@Added forward decl support
@
text
@a7 1
print orb
d10 1
a10 1
print o.__repo_id
d21 1
d34 1
d36 1
@


1.10
log
@Big process_idl.c update, misc small fixes
@
text
@d23 2
@


1.9
log
@Added a test-suite demonstrating a bug with the sequence demarshalling
code (with ORBit >= 0.5.5).
@
text
@d8 1
d40 1
@


1.8
log
@Updated test suite for design changes
@
text
@d37 2
@


1.7
log
@Major code overhaul
@
text
@d5 1
a6 2
CORBA.load_idl("test-suite.idl")
import Fruit
a10 1

a16 1

@


1.6
log
@
Plenty of bug/leak fixes, some feature additions, cleanups, etc.
@
text
@d7 1
@


1.5
log
@
marshal_float: promote ints to floats
@
text
@d7 1
a7 1
orb = CORBA.ORB_init((), CORBA.ORB_ID)
d11 1
d30 1
a30 1
		i.throw_out()
@


1.4
log
@
Port to C.
@
text
@d35 1
a35 1
union = o.test_union(Fruit.orange)
@


1.3
log
@
Made CORBA.ORB_init more conformant
@
text
@d4 1
a9 1
print o
@


1.2
log
@
Properly demarshals generic Objects now.
@
text
@d6 1
a6 1
orb = CORBA.ORB_init("orbit-local-orb")
@


1.1
log
@Initial revision
@
text
@d9 2
@


1.1.1.1
log
@
Initial project import.
@
text
@@
