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


c1 = L.Class()
c2 = L.Class()
c3 = L.Class()
c4 = L.Class()
c5 = L.Class()
c6 = L.Class()

s1 = coral.Set()
s1.add(c1)
s1.add(c2)

s2 = coral.Set()
s2.add(c1)

s = s1 - s2
assert s.size() == 1
assert c2 in s

s = s1 + s2
assert s.size() == 2
assert c1 in s
assert c2 in s

s2.add(c3)
s = s1 + s2
assert s.size() == 3
assert c1 in s
assert c2 in s
assert c3 in s

s = s1 & s2
assert s.size() == 1
assert c1 in s
