Exemplo n.º 1
0
 def test():
     assert utility.unwrap_char(
         interpret_bc([0x70, 0x76, 0x20, 0xc1, 0x7c],
                      fakeliterals(wrap_char("b")),
                      receiver=w_fakeinst)) == "b"
     assert utility.unwrap_char(w_fakeinst.fetch(0)) == "a"
     assert utility.unwrap_char(w_fakeinst.fetch(1)) == "b"
Exemplo n.º 2
0
 def test():
     assert utility.unwrap_char(interpret_bc(
         [0x70, 0x76, 0x20, 0xc1, 0x7c],
         fakeliterals(wrap_char("b")),
         receiver=w_fakeinst)) == "b"
     assert utility.unwrap_char(w_fakeinst.fetch(0)) == "a"
     assert utility.unwrap_char(w_fakeinst.fetch(1)) == "b"
Exemplo n.º 3
0
def func(interp, w_obj, n0, w_val):
    val = utility.unwrap_char(w_val)
    n0 = assert_valid_index(n0, w_obj)
    w_obj.setchar(n0, val)
    return w_val
Exemplo n.º 4
0
 def test():
     assert utility.unwrap_char(
         interpret_bc([112, 118, 192, 124],
                      fakeliterals(),
                      receiver=w_fakeinst)) == "b"
Exemplo n.º 5
0
def func(interp, w_obj, n0, w_val):
    val = utility.unwrap_char(w_val)
    n0 = assert_valid_index(n0, w_obj)
    w_obj.setchar(n0, val)
    return w_val
Exemplo n.º 6
0
 def test():
     assert utility.unwrap_char(interpret_bc(
         [112, 118, 192, 124],
         fakeliterals(),
         receiver=w_fakeinst)) == "b"