Tests for shape-outside and negative margins