mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
tests: Add some tests to improve coverage.
Used gcov to find some parts of vm.c, runtime.c, obj.c that were not covered by any tests. Still need to use gcov more thoroughly.
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
# test builtin hash function
|
||||
|
||||
print(hash(False))
|
||||
print(hash(True))
|
||||
print({():1}) # hash tuple
|
||||
print({1 << 66:1}) # hash big int
|
||||
print(hash in {hash:1}) # hash function
|
||||
|
||||
try:
|
||||
hash([])
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
|
||||
class A:
|
||||
def __hash__(self):
|
||||
return 123
|
||||
|
||||
Reference in New Issue
Block a user