#!/usr/bin/env python
import coral
m1 = coral.loadModel("../../../coral/core/CORE01.xmi")
m2 = coral.loadModel("../../lang/UML14/def/UML14.xmi")
m3 = coral.loadModel("../../lang/SMD01/def/SMD01.xmi")

assert m1
assert m2
assert m3

a1 = m1.elements.select(lambda x: x.name == "AnyAbstractElement")[0]
a2 = m2.elements.select(lambda x: x.name == "ModelElement")[0].superclasses[0]
a3 = m3.elements.select(lambda x: x.name == "Named")[0].superclasses[0]

print a1.name
print a2.name
print a3.name

assert a1.name == a2.name
assert a2.name == a3.name
assert a3.name == a1.name

assert a2.name == a1.name
assert a3.name == a2.name
assert a1.name == a3.name

assert a1 == a2
assert a2 == a3
assert a3 == a1

assert a2 == a1
assert a3 == a2
assert a1 == a3
