Scalar function tests