builtin: add test helper func