auto x = [1, 2, 3] x.erase_at(1) assert_equal([1,3], x); try { // We expect this to throw because of erasing an out of bounds index x.erase_at(2) assert_true(false) } catch (e) { assert_true(true) } try { // We expect this to throw because of erasing an out of bounds index x.erase_at(-1) assert_true(false) } catch (e) { assert_true(true) } x.erase_at(0) assert_equal([3], x) x.erase_at(0) assert_equal([], x)