How to test the FIR filter in C++?
The first basic test could be to use a unit impulse as an input signal and see if the output signal equals the impulse response (i.e. the filter coefficients). Another simple test signal is a unit step. The corresponding output should be the cumulative sum of the filter's impulse response, i.e. for $x[n]=u[n]$, the output must be

$$y[n]=\sum_{k=0}^nh[k],\quad n\ge 0$$

If you obtain the desired response for these two simple test signals, that's a good start, but I wouldn't stop there.
In general it is very helpful to use a tool like Matlab or Octave (free), or anything similar, which has built-in filtering routines against which you can check your routine for arbitrary input signals.