Closed FBek055 closed 3 years ago
If you look in the Transcript, you should see this message:
GdiplusTests package needs to be installed for this example to work.
Which hopefully is self explanatory, although it should be an error rather than a notification, or it is liable to be overlooked.
A system wise auto-testing of class examples would also be handy.
They are all tested. The original authors who contributed the package decided to package the resources this way in order to take advantage of SUnit resources as part of also testing the examples. Given that these particular examples don't work without the tests it might have been better that they were put in the test package, or alternately that the resources were not, but it is more inconvenient than broken. I would recommend always loading the tests (see readme), as one of their uses is as a source of examples.
Thanks for the quick response and clarifications, fair enough.
I may have missed a beat, as a beginner, are you referring to running TestDPRO.cmd which presumably loads all test packages? I could not find any reference to a GdiplusTests package otherwise.
Just 'File/File in...' the RegressionTestsLoad.st
script file, or open the script that is run by TestDPRO.cmd, RegressionTestsRun.st
, and evaluate this bit:
SourceManager default fileIn: 'RegressionTestsLoad.st'
OK, I had to rebuild Dolphin to ensure a clean setup, run TestDPRO.cmd to ensure all is checked, then File in RegressionTestsLoad.st
using Source Browser. The broken resource issue is now resolved.
Thanks for the support
Describe the bug Graphics.Gdiplus.Image and Graphics.Gdiplus.Bitmap have a number of broken Class Examples, 'exampleGdiplxx' due to missing resourcee, e.i., pafEye.jpg & _pafRgb0000FF100x100bmp & pafSeattleNightJpg & fish32x32pngBytes & pafWinXP32x32ico ...
To Reproduce Steps to reproduce the behavior:
Expected behavior Restore or replace missing resources to ensure all class examples will execute without errors. A system wise auto-testing of class examples would also be handy.
Please complete the following information):
Additional context Class examples are very valuable, it would really be handy to include as many as possible, in a systematic way, to showcase the various features, especially given the limited availability of other forms of documentation. Could this be a valid alternate form of built-in comprehensive documentation? (I presume most of them are written anyway, at an early stage of a class development, as a first means to check the functionality). If all class examples could be made to follow a unified protocol, finding and testing them could be easily automated.