I am running a simple weighted regression as follows:

reghdfe y i.treatment [weight=size], noa vce(robust)

My treatment variable has 4 categories, and I would like to test if the pairwise mean differences in y are different for each of the pairs (1 vs. 4, 2 vs. 4, etc.). Normally, I would do something like this:

test 1.treatment = 2.treatment

I am wondering if this command is still valid with weighted least squares. If not, is there another way to do this test?