tests don't call relibc implementation of string functions.
Created by: jrraymond
I was implementing strpbrk
, which calls strcspn
. When called from inside my implementation of strpbrk
, strcspn
was crashing at src/string/src/lib.rs:140: attempt to shift left with overflow
on the inputs hello, worlde
, aeiouy
. However, when I called strcspn
from the tests with the same inputs it worked.
So I commented out almost the entire implementaiton of strcspn
so it would always return 0
. But when I run the tests strcspn
still produces the correct results.
I also commented out most of the implementation of strspn
and strchr
, and they still produce the correct results. So I added back the uniplemented!
macro and the tests still work.
I wonder if this is just some quirk of my system?