Shortened test code for slice