# Path: mom/gmp.py
#   def number_to_pybytes(num):
#   def to_str(raw_bytes_num):
#   def number_to_pybytes(num):
#   def to_str(raw_bytes_num):
#   def __init__(self, init_value=0):
#   def __del__(self):
#   def _as_parameter_(self):
#   def from_param(arg):
#   def _apply_ret(self, func, ret, op1, op2):
#   def _apply_2_rets(self, func, ret1, ret2, op1, op2):
#   def _apply_ret_2_0(self, func, ret, op1):
#   def _apply_ret_2_1(self, func, op1, op2):
#   def set(self, value):
#   def _tobytes(self):
#   def __str__(self):
#   def __repr__(self):
#   def __lt__(self, other):
#   def __le__(self, other):
#   def __eq__(self, other):
#   def __ne__(self, other):
#   def __gt__(self, other):
#   def __ge__(self, other):
#   def __add__(self, other):
#   def __sub__(self, other):
#   def __mul__(self, other):
#   def __divmod__(self, divisor):
#   def __rdivmod__(self, dividend):
#   def __div__(self, other):
#   def __truediv__(self, unused_other):
#   def __floordiv__(self, other):
#   def __and__(self, other):
#   def __mod__(self, other):
#   def __xor__(self, other):
#   def __or__(self, other):
#   def __iadd__(self, other):
#   def __isub__(self, other):
#   def __imul__(self, other):
#   def __imod__(self, other):
#   def __idiv__(self, other):
#   def __itruediv__(self, unused_other):
#   def __ifloordiv__(self, other):
#   def __iand__(self, other):
#   def __ixor__(self, other):
#   def __ior__(self, other):
#   def __radd__(self, other):
#   def __rsub__(self, other):
#   def __rmul__(self, other):
#   def __rdiv__(self, other):
#   def __rtruediv__(self, unused_other):
#   def __rfloordiv__(self, other):
#   def __rmod__(self, other):
#   def __abs__(self):
#   def __neg__(self):
# class c_mpz_struct(ctypes.Structure):
# class c_gmp_randstate_struct(ctypes.Structure):
# class c_mpq_struct(ctypes.Structure):
# class c_mpf_struct(ctypes.Structure):
# class Integer(object):
# RAND_ALGO_DEFAULT = _GMP_randinit_default
# RAND_ALGO_MT = _GMP_randinit_mt


import operator
import unittest2
from mom import gmp
    self.assertTrue(self.large_gmp2 != self.large_gmp)

  def test_NotEqualsPyLong(self):
    self.assertTrue(self.large_gmp != 5000000001)
    self.assertFalse(self.large_gmp != 5000000000)
    self.assertTrue(self.large_gmp2 != 5000000000)

  def test_PyLongNotEquals(self):
    self.assertTrue(5000000000 != self.large_gmp2)
    self.assertFalse(5000000000 != self.large_gmp)
    self.assertTrue(5000000001 != self.large_gmp)


class Test_IntegerBitOps(unittest2.TestCase):
  def setUp(self):
    self.small_gmp = gmp.Integer(19)
    self.small_gmp2 = gmp.Integer(250)
    self.large_gmp = gmp.Integer(5000000000)
    self.large_gmp2 = gmp.Integer(5000500500)
    self.small_neg_gmp = gmp.Integer(-19)
    self.large_neg_gmp = gmp.Integer(-5000000000)

  def test_And(self):
    self.assertEqual(self.large_gmp & self.large_gmp, self.large_gmp)
    self.assertEqual(self.large_gmp & self.small_gmp,
                     gmp.Integer(5000000000 & 19))
    self.assertEqual(self.large_gmp & 250, gmp.Integer(5000000000 & 250))
    self.assertEqual(self.large_neg_gmp & self.small_neg_gmp,
                     gmp.Integer(-5000000000 & -19))


# Path: mom/gmp.py
#   def number_to_pybytes(num):
#   def to_str(raw_bytes_num):
#   def number_to_pybytes(num):
#   def to_str(raw_bytes_num):
#   def __init__(self, init_value=0):
#   def __del__(self):
#   def _as_parameter_(self):
#   def from_param(arg):
#   def _apply_ret(self, func, ret, op1, op2):
#   def _apply_2_rets(self, func, ret1, ret2, op1, op2):
#   def _apply_ret_2_0(self, func, ret, op1):
#   def _apply_ret_2_1(self, func, op1, op2):
#   def set(self, value):
#   def _tobytes(self):
#   def __str__(self):
#   def __repr__(self):
#   def __lt__(self, other):
#   def __le__(self, other):
#   def __eq__(self, other):
#   def __ne__(self, other):
#   def __gt__(self, other):
#   def __ge__(self, other):
#   def __add__(self, other):
#   def __sub__(self, other):
#   def __mul__(self, other):
#   def __divmod__(self, divisor):
#   def __rdivmod__(self, dividend):
#   def __div__(self, other):
#   def __truediv__(self, unused_other):
#   def __floordiv__(self, other):
#   def __and__(self, other):
#   def __mod__(self, other):
#   def __xor__(self, other):
#   def __or__(self, other):
#   def __iadd__(self, other):
#   def __isub__(self, other):
#   def __imul__(self, other):
#   def __imod__(self, other):
#   def __idiv__(self, other):
#   def __itruediv__(self, unused_other):
#   def __ifloordiv__(self, other):
#   def __iand__(self, other):
#   def __ixor__(self, other):
#   def __ior__(self, other):
#   def __radd__(self, other):
#   def __rsub__(self, other):
#   def __rmul__(self, other):
#   def __rdiv__(self, other):
#   def __rtruediv__(self, unused_other):
#   def __rfloordiv__(self, other):
#   def __rmod__(self, other):
#   def __abs__(self):
#   def __neg__(self):
# class c_mpz_struct(ctypes.Structure):
# class c_gmp_randstate_struct(ctypes.Structure):
# class c_mpq_struct(ctypes.Structure):
# class c_mpf_struct(ctypes.Structure):
# class Integer(object):
# RAND_ALGO_DEFAULT = _GMP_randinit_default
# RAND_ALGO_MT = _GMP_randinit_mt


# Path: mom/tests/test_mom_gmp.py
import operator
import unittest2
from mom import gmp

    self.assertTrue(self.large_gmp2 != self.large_gmp)

  def test_NotEqualsPyLong(self):
    self.assertTrue(self.large_gmp != 5000000001)
    self.assertFalse(self.large_gmp != 5000000000)
    self.assertTrue(self.large_gmp2 != 5000000000)

  def test_PyLongNotEquals(self):
    self.assertTrue(5000000000 != self.large_gmp2)
    self.assertFalse(5000000000 != self.large_gmp)
    self.assertTrue(5000000001 != self.large_gmp)


class Test_IntegerBitOps(unittest2.TestCase):
  def setUp(self):
    self.small_gmp = gmp.Integer(19)
    self.small_gmp2 = gmp.Integer(250)
    self.large_gmp = gmp.Integer(5000000000)
    self.large_gmp2 = gmp.Integer(5000500500)
    self.small_neg_gmp = gmp.Integer(-19)
    self.large_neg_gmp = gmp.Integer(-5000000000)

  def test_And(self):
    self.assertEqual(self.large_gmp & self.large_gmp, self.large_gmp)
    self.assertEqual(self.large_gmp & self.small_gmp,
                     gmp.Integer(5000000000 & 19))
    self.assertEqual(self.large_gmp & 250, gmp.Integer(5000000000 & 250))
    self.assertEqual(self.large_neg_gmp & self.small_neg_gmp,
                     gmp.Integer(-5000000000 & -19))


  def test_InPlaceAnd(self):