     static let allTests = [
         ("testSourceX", testSourceX),
         ("testImageFormats", testImageFormats),
-        ("testReadPNGData", testReadPNGData)
+        ("testReadPNGData", testReadPNGData),
+        ("testPDFSurface", testPDFSurface)
         ]
     
     func testSourceX() {

            
            for size in sizes {
                
                let testFilename = outputDirectory + "\(testName)_\(format)_\(size).png"
                
                let surface = try! Surface.Image(format: format, width: size, height: size)
                
                let context = Cairo.Context(surface: surface)
                
                context.drawSourceX(size: size)
                
                surface.writePNG(atPath: testFilename)
                


fileprivate extension CairoTests {
    
    func testDraw<T: Surface>(functionName: String = #function,
                  createSurface: (_ size: Int) -> (T),
                  forEach: ((_ surface: T) -> ())? = nil) {
        
        let sizes = [10, 20, 50, 100, 200, 500, 1000, 10000]
        
        for size in sizes {
            
            let surface = createSurface(size)
            
            let context = Cairo.Context(surface: surface)
            
            context.drawSourceX(size: size)
            
            forEach?(surface)
        }
    }
    
    func writeTestPNG(testName: String,
                      functionName: String = #function,
                      forEach: ((_ surface: Surface.Image, _ filename: String) -> ())? = nil) {
