@@ -2374,6 +2374,8 @@ TEST(converter)
23742374{
23752375 List<std::string> supportedFormats;
23762376 ASSERT (Converter::instance ().possibleInputFormats (supportedFormats) == List<std::string> {});
2377+ ASSERT (Converter::instance ().possibleOutputFormats (supportedFormats, " application/pdf" )
2378+ == List<std::string> {});
23772379
23782380 // PDF to PDF
23792381 supportedFormats = {" application/pdf" };
@@ -2388,46 +2390,62 @@ TEST(converter)
23882390 == (List<std::string> {" application/pdf" , " image/pwg-raster" }));
23892391 ASSERT (Converter::instance ().getTargetFormat (" application/pdf" , supportedFormats)
23902392 == " image/pwg-raster" );
2393+ ASSERT (Converter::instance ().possibleOutputFormats (supportedFormats, " application/pdf" )
2394+ == (List<std::string> {" image/pwg-raster" }));
23912395
23922396 // ...and URF
23932397 supportedFormats = {" image/urf" };
23942398 ASSERT (Converter::instance ().possibleInputFormats (supportedFormats)
23952399 == (List<std::string> {" application/pdf" , " image/urf" }));
23962400 ASSERT (Converter::instance ().getTargetFormat (" application/pdf" , supportedFormats)
23972401 == " image/urf" );
2402+ ASSERT (Converter::instance ().possibleOutputFormats (supportedFormats, " application/pdf" )
2403+ == (List<std::string> {" image/urf" }));
23982404
23992405 // PDF has higher prio than raster
24002406 supportedFormats = {" image/pwg-raster" , " application/pdf" };
24012407 ASSERT (Converter::instance ().possibleInputFormats (supportedFormats)
24022408 == (List<std::string> {" application/pdf" , " image/pwg-raster" }));
24032409 ASSERT (Converter::instance ().getTargetFormat (" application/pdf" , supportedFormats)
24042410 == " application/pdf" );
2411+ ASSERT (Converter::instance ().possibleOutputFormats (supportedFormats, " application/pdf" )
2412+ == (List<std::string> {" application/pdf" , " image/pwg-raster" }));
24052413
24062414 // Octet Stream, because why not
24072415 supportedFormats = {" application/octet-stream" , " image/pwg-raster" , " application/pdf" };
24082416 ASSERT (Converter::instance ().possibleInputFormats (supportedFormats)
24092417 == (List<std::string> {" application/pdf" , " application/octet-stream" , " image/pwg-raster" }));
24102418 ASSERT (Converter::instance ().getTargetFormat (" application/pdf" , supportedFormats)
24112419 == " application/pdf" );
2420+ ASSERT (Converter::instance ().possibleOutputFormats (supportedFormats, " application/pdf" )
2421+ == (List<std::string> {" application/pdf" , " image/pwg-raster" }));
24122422
24132423 // PDF has higher prio than Postscript too
24142424 supportedFormats = {" application/postscript" , " application/pdf" };
24152425 ASSERT (Converter::instance ().possibleInputFormats (supportedFormats)
24162426 == (List<std::string> {" application/pdf" , " application/postscript" }));
24172427 ASSERT (Converter::instance ().getTargetFormat (" application/pdf" , supportedFormats)
24182428 == " application/pdf" );
2429+ ASSERT (Converter::instance ().possibleOutputFormats (supportedFormats, " application/pdf" )
2430+ == (List<std::string> {" application/pdf" , " application/postscript" }));
24192431
24202432 // Postscript has higher prio than raster
24212433 supportedFormats = {" image/pwg-raster" , " application/postscript" };
24222434 ASSERT (Converter::instance ().possibleInputFormats (supportedFormats)
24232435 == (List<std::string> {" application/pdf" , " image/pwg-raster" , " application/postscript" }));
24242436 ASSERT (Converter::instance ().getTargetFormat (" application/pdf" , supportedFormats)
24252437 == " application/postscript" );
2438+ ASSERT (Converter::instance ().possibleOutputFormats (supportedFormats, " application/pdf" )
2439+ == (List<std::string> {" application/postscript" , " image/pwg-raster" }));
24262440
24272441 // JPEG needs JPEG support
24282442 ASSERT_FALSE (Converter::instance ().getTargetFormat (" image/jpeg" , supportedFormats));
2443+ ASSERT (Converter::instance ().possibleOutputFormats (supportedFormats, " image/jpeg" )
2444+ == List<std::string> {});
24292445 supportedFormats = {" application/octet-stream" , " image/pwg-raster" , " application/pdf" , " image/jpeg" };
24302446 ASSERT (Converter::instance ().getTargetFormat (" image/jpeg" , supportedFormats) == " image/jpeg" );
2447+ ASSERT (Converter::instance ().possibleOutputFormats (supportedFormats, " image/jpeg" )
2448+ == (List<std::string> {" image/jpeg" }));
24312449
24322450 // Functions exist. TODO: Check that they are the correct ones.
24332451 ASSERT (Converter::instance ().getConvertFun (" application/pdf" , " application/pdf" ));
0 commit comments