core: fixing new test

Removed the ‘hashcode’ function so we didn’t need to import it here,
but also removed the needed type assertion.
Merge pull request #662 from svanharmelen/master

core: fixing new test