test function. asserts to ensure list sorted. insertion sort works