add unit/integrted tests for dpc

`w` should either be clipped to [0, 1] or raise an exception out of that bound.