Yes, I do this. It is a form of testing to see if people are safe and honest.
But I was reading that it can also be a form of self sabotage by setting tests that the majority of people will fail. For example, in past friendships, I almost expect people to be psychic and know what's on my mind and what I'm feeling, without me actually telling them. When they fail to notice, or keep out my way because I seem withdrawn, I start to believe that they don't want to know me because I'm not good enough for them, or that they just don't care how I'm feeling. In reality, if I told them how I was feeling, they might have been there as friends (maybe).
It seems like a fine line between the need to test and setting people up to fail.
Recently I brought up a sticky point between me and a friend. It was a kind of test, as this is something that I've walked away from her for before. And by asking, it brought up all those past judgements she made of me some three years ago. So nothing has changed, she's not found any more understanding etc, she's just buried it. And I don't want her to be a friend with all that stuff buried. It's like walking on egg shells. I was devastated for a few days, but I feel relieved now.
It's something I'm going to talk with my therapist about in our next session, and maybe she will help me see whether it was a test that I needed to do, or whether it was unnecessary sabotage .