inheritance swap test