#!/usr/bin/env python
import coral
L = coral.lang.UML14

c1=L.Class()
c2=L.Class()
g=L.Generalization()
ok=0
try:
	g.child=[]
except:
	ok=1
assert(ok)
ok=0
try:
	g.child=[c1,c2]
except:
	ok=1
assert(ok)
g.child=c1
g.parent=c2
g.child=c2
g.parent=c1
g.child=None
g.child=c1
ok=0
try:
	g.child=[]
except:
	ok=1
assert(ok)
ok=0
try:
	g.child=[c1,c2]
except:
	ok=1
assert(ok)
