Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: third_party/yasm/patched-yasm/tools/python-yasm/tests/test_expr.py

Issue 11369048: Update Yasm to 1.2.0 (Yasm Part 2/3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # $Id: test_expr.py 1527 2006-05-07 16:41:16Z mu $
2 from tests import TestCase, add 1 from tests import TestCase, add
3 from yasm import Expression 2 from yasm import Expression
4 import operator 3 import operator
5 4
6 class TExpression(TestCase): 5 class TExpression(TestCase):
7 def test_create(self): 6 def test_create(self):
8 e1 = Expression(operator.add, 1, 2) 7 e1 = Expression(operator.add, 1, 2)
9 e2 = Expression('+', 1, 2) 8 e2 = Expression('+', 1, 2)
10 9
11 self.assertEquals(e1.get_intnum(), e1.get_intnum()) 10 self.assertEquals(e1.get_intnum(), e1.get_intnum())
12 11
13 def test_extract(self): 12 def test_extract(self):
14 e1 = Expression('/', 15, 5) 13 e1 = Expression('/', 15, 5)
15 self.assertEquals(e1.get_intnum(), 3) 14 self.assertEquals(e1.get_intnum(), 3)
16 self.assertRaises(ValueError, e1.extract_segoff) 15 self.assertRaises(ValueError, e1.extract_segoff)
17 self.assertRaises(ValueError, e1.extract_wrt) 16 self.assertRaises(ValueError, e1.extract_wrt)
18 17
19 add(TExpression) 18 add(TExpression)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698