-
Notifications
You must be signed in to change notification settings - Fork 1
SketchMorph2 Tests
This category contains two classes that are responsible for testing different aspects of the system
This is where the main functionality (the tools, undo, etc.) gets tested. To test a tool, we simulate user input and compare the resulting image to an image that has been saved as a static class method of the test class. This means that we don't have to worry about comparing for instance a geometric form by its geometric properties but can just compare these two images pixel by pixel.
This code stores formToSave
in the method #methodName
in the M2DrawingComponentTests
class:
| stream methodStub |
stream := WriteStream on: String new.
formToSave storeOn: stream.
methodStub := 'methodName
"This is an auto-generated method"
^ '.
M2DrawingComponentTests classSide
compile: methodStub, stream contents
classified: 'testing - forms'.
This contains tests for the frontend. Tests in this class check if all the UI elements exist and do what they're supposed to. For more information about the framework used, see here.