I've only tested this in the advanced AI NPC, but once you've set up entry hazard and try to whirlwind them, or roar they will keep on switching out if the pokemon that got sent out cannot outspeed you or does not have any super effective moves to hit you, even though you do not have any attacking moves on you.
Steps to reproduce:
1. Make an advanced AI NPC with all bug type pokemon in the team
2. Use a skarmory with stealth rocks, spikes, roost, whirlwind
3. Fight the npc, set up all the hazards and hopefully not die, then start whirlwind-ing.
4. NPC will keep switching out and take damage on the entry hazards
Another thing I've noticed while testing is that no matter what, the opponent won't use rapid spin to clear hazards. I think it's because it only considers it an attacking move with 20 damage so it won't pick it.