code stringlengths 3 6.57k |
|---|
self.interpret(fn, [3, 3]) |
test_dict_popitem(self) |
func() |
self.newdict() |
d.popitem() |
len(d) |
d.popitem() |
d.popitem() |
len(d) |
self.interpret(func, []) |
test_dict_pop(self) |
f(n, default) |
self.newdict() |
d.pop(n) |
d.pop(n, default) |
len(d) |
self.interpret(f, [2, -1]) |
self.interpret(f, [3, -1]) |
self.interpret(f, [2, 5]) |
test_dict_pop_instance(self) |
A(object) |
f(n) |
self.newdict() |
A() |
d.pop(n, None) |
self.interpret(f, [2]) |
self.interpret(f, [700]) |
test_dict_but_not_with_char_keys(self) |
func(i) |
self.newdict() |
self.interpret(func, [6]) |
test_dict_valid_resize(self) |
func() |
self.newdict() |
range(10) |
str(i) |
range(10) |
str(i) |
self.interpret(func, []) |
test_dict_of_addresses(self) |
lltype.Struct('x') |
lltype.malloc(TP, flavor='raw', immortal=True) |
lltype.malloc(TP, flavor='raw', immortal=True) |
func(i) |
self.newdict() |
llmemory.cast_ptr_to_adr(a) |
llmemory.cast_ptr_to_adr(b) |
llmemory.cast_ptr_to_adr(a) |
llmemory.cast_ptr_to_adr(b) |
self.interpret(func, [3]) |
test_prebuilt_list_of_addresses(self) |
lltype.Struct('x', ('y', lltype.Signed) |
lltype.malloc(TP, flavor='raw', immortal=True) |
lltype.malloc(TP, flavor='raw', immortal=True) |
lltype.malloc(TP, flavor='raw', immortal=True) |
llmemory.cast_ptr_to_adr(a) |
llmemory.cast_ptr_to_adr(a) |
llmemory.cast_ptr_to_adr(b) |
llmemory.cast_ptr_to_adr(c) |
self.newdict() |
func(i) |
llmemory.cast_ptr_to_adr(ptr) |
py.test.raises(TypeError, self.interpret, func, [0]) |
test_dict_of_voidp(self) |
func() |
self.newdict() |
lltype.nullptr(rffi.VOIDP.TO) |
len(d) |
self.interpret(func, []) |
compile(func, []) |
f() |
test_dict_with_SHORT_keys(self) |
func(x) |
self.newdict() |
rffi.cast(rffi.SHORT, 42) |
rffi.cast(rffi.SHORT, -43) |
rffi.cast(rffi.SHORT, x) |
self.interpret(func, [42]) |
self.interpret(func, [2**16 - 43]) |
test_dict_with_bool_keys(self) |
func(x) |
self.newdict() |
self.interpret(func, [5]) |
self.interpret(func, [42]) |
test_memoryerror_should_not_insert(self) |
_check_small_range(self, n) |
range(n) |
do_insert(d, i) |
func() |
self.newdict() |
do_insert(d, i) |
return (i in d) |
self.interpret(func, []) |
test_dict_with_none_key(self) |
func(i) |
self.newdict() |
self.interpret(func, [42]) |
test_externalvsinternal(self) |
func() |
self.newdict() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.