ad unittests: fixing some mistaken committed line, repaired logic in sparse testing