Exemple #1
0
    def testBasicReplace(self):
        """ Add """
        a = BitVecConstant(size=32, value=100)
        b1 = BitVecVariable(size=32, name="VAR1")
        b2 = BitVecVariable(size=32, name="VAR2")

        c = a + b1

        x = replace(c, {b1: b2})
        self.assertEqual(translate_to_smtlib(x), "(bvadd #x00000064 VAR2)")
    def testBasicReplace(self):
        ''' Add '''
        a = BitVecConstant(32, 100)
        b1 = BitVecVariable(32, 'VAR1')
        b2 = BitVecVariable(32, 'VAR2')

        c = a + b1

        x = replace(c, {b1: b2})
        self.assertEqual(translate_to_smtlib(x), '(bvadd #x00000064 VAR2)')