Added test for particle function attribute 'add_spin'