GAS seems to allow this, and I can't think of a reason why these directives should be considered uses.
LGTM if GAS does allow multiple uses of .set to change the value. One nit on the test, can you add a case where you don't have an .if directive like:
.set foo, 5 # CHECK: .byte 5 .byte foo
I think it would make sense to have that at the bottom even if there is already a test for it, just to verify that plain .set semantics are still correct when preceded by several .if/.else directives.