Skip to content

Commit

Permalink
Introduce MSTest2 .runsettings configuration file from https://docs.m…
Browse files Browse the repository at this point in the history
…icrosoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2019#example-runsettings-file (to be cleaned up and adjusted for our needs)

Moved a few failing tests around -- considering auto-generating this stuff as it gets weildy pretty quickly...
  • Loading branch information
GerHobbelt committed Feb 19, 2021
1 parent 86e1282 commit d274fd6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MuPDF
1 change: 1 addition & 0 deletions Qiqqa.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
LICENSE = LICENSE
package.json = package.json
Qiqqa.Build\QiqqaCodeAnalysisRules.ruleset = Qiqqa.Build\QiqqaCodeAnalysisRules.ruleset
QiqqaUnitTests.runsettings = QiqqaUnitTests.runsettings
README.md = README.md
superclean.sh = superclean.sh
update_CHANGELOG.sh = update_CHANGELOG.sh
Expand Down
29 changes: 23 additions & 6 deletions QiqqaUnitTester/PDFDocumentMetaInfoTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ public void Test_PDF_metadata_extraction_via_multipurp_chunk0021_document_outlin
[DataRow("./Steen - Gaussian Quadratures for the Integrals xxx.pdf")]
[DataRow("./tb87nemeth.pdf")]
[DataRow("./test.pdf")]
[DataRow("./testfile1.pdf")]
[DataRow("./testflow_ctl_A4.pdf")]
[DataRow("./testflow_ctl_LTR.pdf")]
[DataRow("./testflow_doc.pdf")]
Expand All @@ -318,6 +317,7 @@ public void Test_PDF_metadata_extraction_via_multipurp_chunk0030(string filepath
);
}

[DataRow("./testfile1.pdf")]
[DataRow("./testfile2.pdf")]
[DataTestMethod]
public void Test_PDF_metadata_extraction_via_multipurp_chunk0031(string filepath)
Expand Down Expand Up @@ -434,7 +434,6 @@ public void Test_PDF_metadata_extraction_via_multipurp_chunk0051_pdfbox(string f
[DataRow("./pdfbox/data-000001.pdf")]
[DataRow("./pdfbox/debug.xml.pdf")]
[DataRow("./pdfbox/DifferentDALevels.pdf")]
[DataRow("./pdfbox/document.pdf")]
[DataRow("./pdfbox/embedded_zip.pdf")]
[DataRow("./pdfbox/excel.pdf")]
[DataRow("./pdfbox/F001u_3_7j.pdf")]
Expand Down Expand Up @@ -511,7 +510,6 @@ public void Test_PDF_metadata_extraction_via_multipurp_chunk0053_pdfbox(string f
[DataRow("./pdfbox/PDFBOX-3833-reduced.pdf")]
[DataRow("./pdfbox/PDFBOX-4322-Empty-ToUnicode-reduced.pdf")]
[DataRow("./pdfbox/PDFBOX-4372-2DAYCLVOFG3FTVO4RMAJJL3VTPNYDFRO-p4_reduced.pdf")]
[DataRow("./pdfbox/PDFBOX-4417-001031.pdf")]
[DataRow("./pdfbox/PDFBOX-4417-054080.pdf")]
[DataTestMethod]
public void Test_PDF_metadata_extraction_via_multipurp_chunk0054_pdfbox(string filepath)
Expand Down Expand Up @@ -564,7 +562,6 @@ public void Test_PDF_metadata_extraction_via_multipurp_chunk0055_pdfbox(string f
[DataRow("./pdfbox/simple-openoffice.pdf")]
[DataRow("./pdfbox/SimpleForm2Fields.pdf")]
[DataRow("./pdfbox/source.pdf")]
[DataRow("./pdfbox/test-landscape2.pdf")]
[DataRow("./pdfbox/test.pdf")]
[DataRow("./pdfbox/testPDF_multiFormatEmbFiles.pdf")]
[DataRow("./pdfbox/test_pagelabels.pdf")]
Expand Down Expand Up @@ -597,7 +594,6 @@ public void Test_PDF_metadata_extraction_via_multipurp_chunk0056_pdfbox(string f
[DataRow("./pdfbox/ccitt4-cib-test.pdf")]
[DataRow("./pdfbox/PDFBOX-3042-003177-p2.pdf")]
[DataRow("./pdfbox/png_demo.pdf")]
[DataRow("./pdfbox/survey.pdf")]
[DataRow("./pdfbox/test.unc.pdf")]
[DataTestMethod]
public void Test_PDF_metadata_extraction_via_multipurp_chunk0057_pdfbox(string filepath)
Expand All @@ -620,7 +616,28 @@ public void Test_PDF_metadata_extraction_via_multipurp_chunk0057_pdfbox(string f
[DataRow("./pdfbox/PasswordSample-256bit.pdf")]
[DataRow("./pdfbox/PasswordSample-40bit.pdf")]
[DataTestMethod]
public void Test_PDF_metadata_extraction_via_multipurp_chunk0051_pdfbox_password_access(string filepath)
public void Test_PDF_metadata_extraction_via_multipurp_chunk0058_pdfbox_password_access(string filepath)
{
string pdf_filename = MiscTestHelpers.GetNormalizedPathToAnyTestDataTestFile($"fixtures/PDF/{ filepath.Replace("./", "") }");
ASSERT.FileExists(pdf_filename);
PDFDocumentMuPDFMetaInfo info = MuPDFRenderer.GetDocumentMetaInfo(pdf_filename, null, ProcessPriorityClass.Normal);

string json_text = ProduceJSONtext4Comparison(info);

// Perform comparison via ApprovalTests->BeyondCompare (that's what I use for *decades* now)
//ApprovalTests.Approvals.VerifyJson(json_out); --> becomes the code below:
ApprovalTests.Approvals.Verify(
new QiqqaApprover(json_text, pdf_filename),
ApprovalTests.Approvals.GetReporter()
);
}

[DataRow("./pdfbox/document.pdf")]
[DataRow("./pdfbox/PDFBOX-4417-001031.pdf")]
[DataRow("./pdfbox/test-landscape2.pdf")]
[DataRow("./pdfbox/survey.pdf")]
[DataTestMethod]
public void Test_PDF_metadata_extraction_via_multipurp_chunk0059_pdfbox(string filepath)
{
string pdf_filename = MiscTestHelpers.GetNormalizedPathToAnyTestDataTestFile($"fixtures/PDF/{ filepath.Replace("./", "") }");
ASSERT.FileExists(pdf_filename);
Expand Down

0 comments on commit d274fd6

Please sign in to comment.