remove warnings from c++ tests

remove warnings about comparison between signed and unsigned integers by
using 1u instead of 1