mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-05-09 10:55:51 +02:00
4647310322
Based on Swiftgram 12.5 (Telegram iOS 12.5). All GLEGram features ported and organized in GLEGram/ folder. Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass, Font Replacement, Fake Profile, Chat Export, Plugin System, and more. See CHANGELOG_12.5.md for full details.
19 lines
521 B
Python
19 lines
521 B
Python
from tests import TestCase, add
|
|
from yasm import Expression
|
|
import operator
|
|
|
|
class TExpression(TestCase):
|
|
def test_create(self):
|
|
e1 = Expression(operator.add, 1, 2)
|
|
e2 = Expression('+', 1, 2)
|
|
|
|
self.assertEquals(e1.get_intnum(), e1.get_intnum())
|
|
|
|
def test_extract(self):
|
|
e1 = Expression('/', 15, 5)
|
|
self.assertEquals(e1.get_intnum(), 3)
|
|
self.assertRaises(ValueError, e1.extract_segoff)
|
|
self.assertRaises(ValueError, e1.extract_wrt)
|
|
|
|
add(TExpression)
|