More info about the light and battery would be useful. Have you tried more than one battery?
To test the switch via elimination:
Take the tailcap off and set it aside.
instead of using the tailcap use a piece of wire and make contact between the negative terminal of the batty and the case of the flashlight. The flashlight should light. To change modes quickly break the connection and remake the connection and you should go up one mode depending on the driver. If it's not flickering it is the switch. If it still flickers your problem is elsewhere. Could be the driver, an LED connection etc.
Bob