To complete what aytimothy said, `@a[m=M] targets all Players with gamemode M:
0
for Survival, 1
for Creative, 2
for Adventure, 3
for Spectator.
For targeting Players that are, fer example, in gamemode 0 or 2, use scoreboards (vis my answer):
First, create a dummy scoreboard objective:
/scoreboard objectives add gameM dummy
Then, add all Players with gamemode Survival and Adventure to the "selectMe":
/scoreboard players set @e[m=0] gameM 1
/scoreboard players set @e[m=2] gameM 1
Now you can enter your command:
/testfor @a[score_gameM_min=1,r=15]
/testfor @p[name=Kimatuy, m=3]