Changed to slices in tests for memstream

Slices should be compared with slices.