Today I finished the layer unit tests, which helped find some bugs (layer list wasn't empty when you close the document and list is empty when you pass a document in the constructor), which are fixed now.
I'll send a pull request with the line patterns unit tests next week.