def test_dump_negative_integer(self, space):
        w_res = space.execute("return Marshal.dump(-1)")
        assert space.str_w(w_res) == "\x04\bi\xFA"

        w_res = space.execute("return Marshal.dump(-123)")
        assert space.str_w(w_res) == "\x04\bi\x80"

        w_res = space.execute("return Marshal.dump(-124)")
        assert space.str_w(w_res) == "\x04\bi\xFF\x84"

        w_res = space.execute("return Marshal.dump(-256)")
        assert space.str_w(w_res) == "\x04\bi\xFF\x00"

        w_res = space.execute("return Marshal.dump(-257)")
        assert space.str_w(w_res) == "\x04\bi\xFE\xFF\xFE"

        w_res = space.execute("return Marshal.dump(-(2 ** 30))")
        assert space.str_w(w_res) == "\x04\bi\xFC\x00\x00\x00\xC0"