From d028d649f00d48d6238b8abba4fc1e6212ca0e99 Mon Sep 17 00:00:00 2001 From: Olivier Couet <Olivier.Couet@cern.ch> Date: Wed, 28 Nov 2007 10:50:59 +0000 Subject: [PATCH] - GIF file for each test. git-svn-id: http://root.cern.ch/svn/root/trunk@21090 27541ba8-7e3a-0410-8455-c3a389f83636 --- test/stressGraphics.cxx | 33 +++++++++++------ test/stressGraphics.ref | 78 ++++++++++++++++++++--------------------- 2 files changed, 61 insertions(+), 50 deletions(-) diff --git a/test/stressGraphics.cxx b/test/stressGraphics.cxx index a227e2ae7df..0ff2c3caeb9 100644 --- a/test/stressGraphics.cxx +++ b/test/stressGraphics.cxx @@ -132,6 +132,8 @@ Int_t gPS1RefNb[39]; Int_t gPS1ErrNb[39]; Int_t gPDFRefNb[39]; Int_t gPDFErrNb[39]; +Int_t gGIFRefNb[39]; +Int_t gGIFErrNb[39]; Int_t gPS2RefNb[39]; Int_t gPS2ErrNb[39]; Bool_t gOptionR; @@ -209,23 +211,25 @@ void stressGraphics(Int_t verbose = 0) // Read the reference file "stressGraphics.ref" FILE *sg = fopen("stressGraphics.ref","r"); - char line[80]; + char line[160]; Int_t i = -1; - while (fgets(line,80,sg)) { + while (fgets(line,160,sg)) { if (i>=0) { sscanf(&line[8], "%d",&gPS1RefNb[i]); sscanf(&line[18],"%d",&gPS1ErrNb[i]); sscanf(&line[28],"%d",&gPDFRefNb[i]); sscanf(&line[38],"%d",&gPDFErrNb[i]); - sscanf(&line[48],"%d",&gPS2RefNb[i]); - sscanf(&line[58],"%d",&gPS2ErrNb[i]); + sscanf(&line[48],"%d",&gGIFRefNb[i]); + sscanf(&line[58],"%d",&gGIFErrNb[i]); + sscanf(&line[68],"%d",&gPS2RefNb[i]); + sscanf(&line[78],"%d",&gPS2ErrNb[i]); } i++; } fclose(sg); if (gOptionR) { - cout << "Test# PS1Ref# PS1Err# PDFRef# PDFErr# PS2Ref# PS2Err#" <<endl; + cout << "Test# PS1Ref# PS1Err# PDFRef# PDFErr# GIFRef# GIFErr# PS2Ref# PS2Err#" <<endl; } else { cout << "**********************************************************************" <<endl; cout << "* Starting Graphics - S T R E S S suite *" <<endl; @@ -354,9 +358,9 @@ Int_t StatusPrint(TString &filename, Int_t id, const TString &title, cout << gLine; for (Int_t i = nch; i < 63; i++) cout << "."; cout << " FAILED" << endl; - cout << " Result = " << res << endl; - cout << " Reference = " << ref << endl; - cout << " Error = " << TMath::Abs(res-ref) + cout << " Result = " << res << endl; + cout << " Reference = " << ref << endl; + cout << " Error = " << TMath::Abs(res-ref) << " (was " << err << ")"<< endl; return 1; } @@ -434,23 +438,30 @@ void TestReport1(TCanvas *C, const TString &title) TPostScript *ps1 = new TPostScript(outfile, 111); C->Draw(); ps1->Close(); - TString psfile = outfile; StatusPrint(psfile, gTestNum, title, AnalysePS(outfile) , gPS1RefNb[gTestNum-1], gPS1ErrNb[gTestNum-1]); sprintf(outfile,"sg%2.2d.pdf",gTestNum); - C->cd(0); TPDF *pdf = new TPDF(outfile,111); C->Draw(); pdf->Close(); - TString pdffile = outfile; StatusPrint(pdffile, 0, " PDF output", FileSize(outfile), gPDFRefNb[gTestNum-1], gPDFErrNb[gTestNum-1]); + + sprintf(outfile,"sg%2.2d.gif",gTestNum); + C->cd(0); + C->SaveAs(outfile); + TString giffile = outfile; + StatusPrint(giffile, 0, " GIF output", FileSize(outfile), + gGIFRefNb[gTestNum-1], + gGIFErrNb[gTestNum-1]); + + gErrorIgnoreLevel = 0; return; diff --git a/test/stressGraphics.ref b/test/stressGraphics.ref index 9303e27de21..3c9ee4c2e3d 100644 --- a/test/stressGraphics.ref +++ b/test/stressGraphics.ref @@ -1,39 +1,39 @@ -Test# PS1Ref# PS1Err# PDFRef# PDFErr# PS2Ref# PS2Err# - 1 536 50 11831 100 576 60 - 2 3590 600 12881 100 3464 600 - 3 459 50 11757 100 499 50 - 4 23235 1500 18343 100 24526 1500 - 5 940 50 11922 100 984 50 - 6 431 50 11743 100 471 50 - 7 4672 50 12941 100 4703 50 - 8 4973 80 12525 100 4992 80 - 9 8724 100 13442 100 8802 100 - 10 8061 70 12629 100 8092 70 - 11 11840 100 13492 100 11881 100 - 12 14739 5000 16298 100 10042 5000 - 13 19055 400 20513 100 19376 400 - 14 14752 100 18321 100 14783 100 - 15 22190 300 41857 100 22355 300 - 16 3519 600 13524 100 4040 600 - 17 4622 600 13234 100 4607 600 - 18 4131 40 14336 100 4162 40 - 19 7721 300 22858 100 7999 300 - 20 4403 150 13628 100 4307 150 - 21 6041 200 15091 100 5890 200 - 22 15052 5500 17339 100 20483 5500 - 23 29248 8200 26573 100 37402 8200 - 24 315850 5500 422605 100 321123 5500 - 25 28082 300 15478 100 28067 300 - 26 67878 700 46203 100 68250 700 - 27 209192 6500 101917 100 214779 6500 - 28 245315 5000 129882 100 249753 5000 - 29 1479260 35000 758322 200 1506711 35000 - 30 298782 2000 170862 800 300060 2000 - 31 23513 200 47662 100 23331 200 - 32 14757 100 28461 100 14708 100 - 33 253386 3000 374476 100 257370 3000 - 34 2606 50 12288 100 2633 50 - 35 1435342 150000 11709 100 1017362 102000 - 36 4837 200 15257 100 22263 200 - 37 6436 200 14875 100 6408 200 - 38 1584818 160000 533530 100 1589683 160000 +Test# PS1Ref# PS1Err# PDFRef# PDFErr# GIFRef# GIFErr# PS2Ref# PS2Err# + 1 536 50 11831 50 413201 500 576 60 + 2 3590 600 12881 100 43461 500 3464 600 + 3 459 50 11757 50 185560 500 499 50 + 4 23235 1500 18343 100 408091 500 24526 1500 + 5 940 50 11922 50 480328 500 984 50 + 6 431 50 11743 50 265375 500 471 50 + 7 4672 50 12941 50 269335 500 4703 50 + 8 4973 80 12525 50 255727 500 4992 80 + 9 8724 100 13442 50 255727 500 8802 100 + 10 8061 70 12629 100 269335 500 8092 70 + 11 11840 100 13492 50 265375 500 11881 100 + 12 14739 5000 16298 100 220932 500 10042 5000 + 13 19055 400 20513 100 192443 500 19376 400 + 14 14752 100 18321 100 234608 500 14783 100 + 15 22190 300 41860 100 472333 500 22355 300 + 16 3519 600 13524 100 269335 500 4040 600 + 17 4622 600 13234 100 377720 500 4607 600 + 18 4131 40 14336 50 361303 500 4162 40 + 19 7721 300 22858 100 109067 500 7999 300 + 20 4403 150 13628 100 220932 500 4307 150 + 21 6041 200 15091 100 220932 500 5890 200 + 22 15052 5500 17339 100 255727 500 20483 5500 + 23 29248 8200 26573 100 548741 500 37402 8200 + 24 315850 5500 422605 100 406639 500 321123 5500 + 25 28082 300 15478 100 354383 500 28067 300 + 26 67878 700 46203 100 406639 500 68250 700 + 27 209192 6500 101917 100 406639 500 214779 6500 + 28 245315 5000 129882 100 461145 500 249753 5000 + 29 1479260 35000 758322 200 686558 500 1506711 35000 + 30 298782 2000 170862 800 345385 500 300060 2000 + 31 23513 200 47662 100 304526 500 23331 200 + 32 14757 100 28461 100 265375 500 14708 100 + 33 253386 3000 374476 100 530034 500 257370 3000 + 34 2606 50 12288 100 356654 500 2633 50 + 35 1435342 150000 11709 100 697574 500 1017362 102000 + 36 4837 200 15257 200 478246 70000 29304 200 + 37 6436 200 14875 100 413201 500 6408 200 + 38 1584818 160000 533530 100 541692 500 1589683 160000 -- GitLab