Add unit_test_swap, fix #19