tests/problem.cc: test for dense and sparse functions.