Basic tests for the forward algorithm.