user lambda to convert pointer and reference tests to normal tests