Tests for algorithms