def setUp(self): self.ul = Var.UpdateLocationBuilder(arch) tpe = Bit64 loc = Loc.RegisterX64('rax') self.var = Var.Var('testVar', loc, tpe) self.b = Builder() self.ul.toStack(self.b, self.var, 3)
def setUp(self): self.ul = Var.UpdateLocationBuilder(arch) tpe = Bit64 loc = Loc.GlobalROAddressX64('pi') self.var = Var.Var('testVar', loc, tpe) self.b = Builder() self.ul.toRegister(self.b, self.var, 'rbx')
def test_init_fail1(self): tpe = Bit64 loc = 'rsi' with self.assertRaises(Exception): Var.Var('testVar', loc, tpe)
def test_init_fail2(self): tpe = 'rsi' loc = Loc.RegisterX64('rsi') with self.assertRaises(Exception): Var.Var('testVar', loc, tpe)
def test_init(self): tpe = Bit64 loc = Loc.RegisterX64('rsi') var = Var.Var('testVar', loc, tpe) self.assertEqual(var.tpe, Bit64)