lib: improve unit tests of debugf and stringf functions