Tests for cast_bits_scalar