Add more tests for writeDoubleAP