# Regina - A Normal Surface Theory Calculator
# Python Test Suite Component
#
# Copyright (c) 2015-2021, Ben Burton
# For further details contact Ben Burton (bab@debian.org).
#
# Tests that == and != behave as expected for Regina's python bindings.
#
# This file is a single component of Regina's python test suite.  To run
# the python test suite, move to the main python directory in the source
# tree and run "make check".
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# As an exception, when this program is distributed through (i) the
# App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
# (iii) Google Play by Google Inc., then that store may impose any
# digital rights management, device limits and/or redistribution
# restrictions that are required by its terms of service.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA.

from __future__ import print_function

print(AbelianGroup.equalityType)
print(Integer.equalityType)
print(Triangulation3.equalityType)

# Test == and != for objects that are equal by value but have different
# underlying C++ pointers.
# The behaviour should be different for different classes.

# Cases that should be reported as equal (by value):

print('Integer:')
a = Integer(3)
b = Integer(3)
print(a == b, a != b)

print('AbelianGroup:')
a = AbelianGroup()
b = AbelianGroup()
print(a == b, a != b)

# Cases that should be reported as different (by C++ reference):

print('Triangulation3:')
a = Triangulation3()
b = Triangulation3()
print(a == b, a != b)

print('GroupPresentation:')
a = GroupPresentation()
b = GroupPresentation()
print(a == b, a != b)

# Test == and != for objects that have the same underlying C++ pointers,
# but different python wrappers.
# In all cases these objects should be reported as equal.

print('Triangulation3:')
a = Triangulation3()
b = a.root()
print(a == b, a != b)

print('Tetrahedron3:')
t = Triangulation3()
a = t.newTetrahedron()
b = t.tetrahedron(0)
print(a == b, a != b)

print('AbelianGroup:')
t = Example3.lens(8,3)
a = t.homology()
b = t.homology()
print(a == b, a != b)

print('GroupPresentation:')
t = Example3.lens(8,3)
a = t.fundamentalGroup()
b = t.fundamentalGroup()
print(a == b, a != b)
