summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/xpak/test_decodeint.py
blob: b949b031dcbff45395b91cdcd2590b3200d5e55b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# xpak/test_decodeint.py
# Copright Gentoo Foundation 2006
# Portage Unit Testing Functionality
# $Id$

from portage.tests import TestCase
from portage.xpak import decodeint, encodeint

class testDecodeIntTestCase(TestCase):

	def testDecodeInt(self):
		
		for n in range(1000):
			self.assertEqual(decodeint(encodeint(n)), n)

		for n in (2 ** 32 - 1,):
			self.assertEqual(decodeint(encodeint(n)), n)