tests: tests isWarned()

See #2917.
6 jobs for feature-c/2247-warnings in 5 minutes and 24 seconds