math/linear_function: Add test suite

Add test suite for LinearFunction object.