Add inplace swap test