All negative int values require a bit-width of 32 as the MSB is 1. But it should work as is. The best way to be sure is to add a test.
writeIntLittleEndianOnOneByte() works only for values 0 to 255

As a side note, if you want to encode small negative values more efficiently with this scheme there is Zig Zag encoding.