add unit/integrted tests for dpc

I think this line is missing a `(1 - w)`