more graphics class tests

- added graphics.Canvas, graphics.Font, graphics.Image, graphics.Quad, graphics.Shader and graphics.Text
- removed rogue resource img
- removed event wait test placeholder
- updated todo list
This commit is contained in:
ell
2023-11-15 19:32:39 +00:00
parent af4c50a4ce
commit ad44eb4fd7
16 changed files with 649 additions and 362 deletions
File diff suppressed because one or more lines are too long
+20 -20
View File
@@ -1,31 +1,31 @@
<!-- PASSED 275 || FAILED 2 || SKIPPED 28 || TIME 16.781 -->
<!-- PASSED 281 || FAILED 2 || SKIPPED 20 || TIME 13.278 -->
**305** tests were completed in **16.781s** with **275** passed, **2** failed, and **28** skipped
**303** tests were completed in **13.278s** with **281** passed, **2** failed, and **20** skipped
### Report
| Module | Pass | Fail | Skip | Time |
| --------------------- | ------ | ------ | ------- | ------ |
| 🔴 audio | 27 | 1 | 0 | 4.898s |
| 🟢 data | 12 | 0 | 0 | 0.213s |
| 🟢 event | 4 | 0 | 2 | 0.103s |
| 🟢 filesystem | 29 | 0 | 2 | 0.561s |
| 🔴 font | 6 | 1 | 0 | 0.123s |
| 🟢 graphics | 93 | 0 | 14 | 2.106s |
| 🟢 image | 5 | 0 | 0 | 0.088s |
| 🟢 math | 20 | 0 | 0 | 0.284s |
| 🟢 physics | 22 | 0 | 6 | 0.059s |
| 🟢 sound | 4 | 0 | 0 | 0.015s |
| 🟢 system | 6 | 0 | 2 | 0.023s |
| 🟢 thread | 5 | 0 | 0 | 0.318s |
| 🟢 timer | 6 | 0 | 0 | 2.020s |
| 🟢 video | 2 | 0 | 0 | 0.016s |
| 🟢 window | 34 | 0 | 2 | 5.954s |
| 🟢 audio | 28 | 0 | 0 | 0.851s |
| 🟢 data | 12 | 0 | 0 | 0.197s |
| 🟢 event | 4 | 0 | 2 | 0.096s |
| 🟢 filesystem | 29 | 0 | 2 | 0.539s |
| 🔴 font | 6 | 1 | 0 | 0.121s |
| 🔴 graphics | 98 | 1 | 6 | 2.029s |
| 🟢 image | 5 | 0 | 0 | 0.087s |
| 🟢 math | 20 | 0 | 0 | 0.321s |
| 🟢 physics | 22 | 0 | 6 | 0.468s |
| 🟢 sound | 4 | 0 | 0 | 0.068s |
| 🟢 system | 6 | 0 | 2 | 0.148s |
| 🟢 thread | 5 | 0 | 0 | 0.376s |
| 🟢 timer | 6 | 0 | 0 | 2.082s |
| 🟢 video | 2 | 0 | 0 | 0.039s |
| 🟢 window | 34 | 0 | 2 | 5.855s |
### Failures
> 🔴 Source
> assert 53 [check effect was applied] expected 'true' got 'false'
> 🔴 GlyphData
> assert 8 [check glyph number] expected '97' got '0'
> 🔴 Canvas
> assert 44 [check depth sample mode set] expected 'equal' got 'nil'
+283 -295
View File
@@ -1,162 +1,161 @@
<testsuites name="love.test" tests="275" failures="2" skipped="28" time="16.781">
<testsuite name="love.audio" tests="27" failures="1" skipped="0" time="4.898">
<testcase classname="RecordingDevice" name="RecordingDevice" assertions="20" time="4.419">
<testsuites name="love.test" tests="281" failures="2" skipped="20" time="13.278">
<testsuite name="love.audio" tests="28" failures="0" skipped="0" time="0.851">
<testcase classname="RecordingDevice" name="RecordingDevice" assertions="20" time="0.397">
</testcase>
<testcase classname="Source" name="Source" assertions="54" time="0.019">
<failure message="assert 53 [check effect was applied] expected 'true' got 'false'">assert 53 [check effect was applied] expected 'true' got 'false'</failure>
<testcase classname="Source" name="Source" assertions="54" time="0.021">
</testcase>
<testcase classname="getActiveEffects" name="getActiveEffects" assertions="3" time="0.013">
<testcase classname="getActiveEffects" name="getActiveEffects" assertions="3" time="0.017">
</testcase>
<testcase classname="getActiveSourceCount" name="getActiveSourceCount" assertions="3" time="0.018">
</testcase>
<testcase classname="getDistanceModel" name="getDistanceModel" assertions="3" time="0.018">
<testcase classname="getDistanceModel" name="getDistanceModel" assertions="3" time="0.017">
</testcase>
<testcase classname="getDopplerScale" name="getDopplerScale" assertions="2" time="0.019">
<testcase classname="getDopplerScale" name="getDopplerScale" assertions="2" time="0.017">
</testcase>
<testcase classname="getEffect" name="getEffect" assertions="4" time="0.018">
<testcase classname="getEffect" name="getEffect" assertions="4" time="0.017">
</testcase>
<testcase classname="getMaxSceneEffects" name="getMaxSceneEffects" assertions="1" time="0.017">
</testcase>
<testcase classname="getMaxSourceEffects" name="getMaxSourceEffects" assertions="1" time="0.016">
<testcase classname="getMaxSourceEffects" name="getMaxSourceEffects" assertions="1" time="0.017">
</testcase>
<testcase classname="getOrientation" name="getOrientation" assertions="6" time="0.018">
<testcase classname="getOrientation" name="getOrientation" assertions="6" time="0.017">
</testcase>
<testcase classname="getPosition" name="getPosition" assertions="3" time="0.017">
<testcase classname="getPosition" name="getPosition" assertions="3" time="0.016">
</testcase>
<testcase classname="getRecordingDevices" name="getRecordingDevices" assertions="1" time="0.017">
</testcase>
<testcase classname="getVelocity" name="getVelocity" assertions="3" time="0.018">
<testcase classname="getVelocity" name="getVelocity" assertions="3" time="0.014">
</testcase>
<testcase classname="getVolume" name="getVolume" assertions="1" time="0.018">
<testcase classname="getVolume" name="getVolume" assertions="1" time="0.017">
</testcase>
<testcase classname="isEffectsSupported" name="isEffectsSupported" assertions="1" time="0.017">
</testcase>
<testcase classname="newQueueableSource" name="newQueueableSource" assertions="3" time="0.016">
<testcase classname="newQueueableSource" name="newQueueableSource" assertions="3" time="0.017">
</testcase>
<testcase classname="newSource" name="newSource" assertions="6" time="0.019">
<testcase classname="newSource" name="newSource" assertions="6" time="0.017">
</testcase>
<testcase classname="pause" name="pause" assertions="2" time="0.019">
<testcase classname="pause" name="pause" assertions="2" time="0.017">
</testcase>
<testcase classname="play" name="play" assertions="1" time="0.019">
<testcase classname="play" name="play" assertions="1" time="0.017">
</testcase>
<testcase classname="setDistanceModel" name="setDistanceModel" assertions="7" time="0.019">
<testcase classname="setDistanceModel" name="setDistanceModel" assertions="7" time="0.018">
</testcase>
<testcase classname="setDopplerScale" name="setDopplerScale" assertions="2" time="0.018">
<testcase classname="setDopplerScale" name="setDopplerScale" assertions="2" time="0.016">
</testcase>
<testcase classname="setEffect" name="setEffect" assertions="3" time="0.017">
</testcase>
<testcase classname="setMixWithSystem" name="setMixWithSystem" assertions="1" time="0.017">
</testcase>
<testcase classname="setOrientation" name="setOrientation" assertions="6" time="0.019">
<testcase classname="setOrientation" name="setOrientation" assertions="6" time="0.016">
</testcase>
<testcase classname="setPosition" name="setPosition" assertions="3" time="0.019">
<testcase classname="setPosition" name="setPosition" assertions="3" time="0.016">
</testcase>
<testcase classname="setVelocity" name="setVelocity" assertions="3" time="0.018">
<testcase classname="setVelocity" name="setVelocity" assertions="3" time="0.016">
</testcase>
<testcase classname="setVolume" name="setVolume" assertions="1" time="0.017">
<testcase classname="setVolume" name="setVolume" assertions="1" time="0.016">
</testcase>
<testcase classname="stop" name="stop" assertions="2" time="0.019">
<testcase classname="stop" name="stop" assertions="2" time="0.017">
</testcase>
</testsuite>
<testsuite name="love.data" tests="12" failures="0" skipped="0" time="0.213">
<testcase classname="ByteData" name="ByteData" assertions="10" time="0.017">
<testsuite name="love.data" tests="12" failures="0" skipped="0" time="0.197">
<testcase classname="ByteData" name="ByteData" assertions="10" time="0.016">
</testcase>
<testcase classname="CompressedData" name="CompressedData" assertions="12" time="0.017">
<testcase classname="CompressedData" name="CompressedData" assertions="12" time="0.016">
</testcase>
<testcase classname="compress" name="compress" assertions="45" time="0.018">
<testcase classname="compress" name="compress" assertions="45" time="0.016">
</testcase>
<testcase classname="decode" name="decode" assertions="4" time="0.018">
</testcase>
<testcase classname="decompress" name="decompress" assertions="18" time="0.018">
<testcase classname="decompress" name="decompress" assertions="18" time="0.017">
</testcase>
<testcase classname="encode" name="encode" assertions="15" time="0.018">
<testcase classname="encode" name="encode" assertions="15" time="0.017">
</testcase>
<testcase classname="getPackedSize" name="getPackedSize" assertions="3" time="0.018">
<testcase classname="getPackedSize" name="getPackedSize" assertions="3" time="0.016">
</testcase>
<testcase classname="hash" name="hash" assertions="6" time="0.019">
<testcase classname="hash" name="hash" assertions="6" time="0.015">
</testcase>
<testcase classname="newByteData" name="newByteData" assertions="3" time="0.017">
<testcase classname="newByteData" name="newByteData" assertions="3" time="0.016">
</testcase>
<testcase classname="newDataView" name="newDataView" assertions="3" time="0.017">
<testcase classname="newDataView" name="newDataView" assertions="3" time="0.015">
</testcase>
<testcase classname="pack" name="pack" assertions="4" time="0.017">
<testcase classname="pack" name="pack" assertions="4" time="0.018">
</testcase>
<testcase classname="unpack" name="unpack" assertions="3" time="0.018">
<testcase classname="unpack" name="unpack" assertions="3" time="0.016">
</testcase>
</testsuite>
<testsuite name="love.event" tests="4" failures="0" skipped="2" time="0.103">
<testcase classname="clear" name="clear" assertions="1" time="0.015">
<testsuite name="love.event" tests="4" failures="0" skipped="2" time="0.096">
<testcase classname="clear" name="clear" assertions="1" time="0.016">
</testcase>
<testcase classname="poll" name="poll" assertions="1" time="0.017">
<testcase classname="poll" name="poll" assertions="1" time="0.016">
</testcase>
<testcase classname="pump" name="pump" assertions="0" time="0.018">
<testcase classname="pump" name="pump" assertions="0" time="0.016">
<skipped message="used internally" />
</testcase>
<testcase classname="push" name="push" assertions="1" time="0.018">
<testcase classname="push" name="push" assertions="1" time="0.016">
</testcase>
<testcase classname="quit" name="quit" assertions="1" time="0.018">
<testcase classname="quit" name="quit" assertions="1" time="0.016">
</testcase>
<testcase classname="wait" name="wait" assertions="0" time="0.017">
<skipped message="test class needs writing" />
<testcase classname="wait" name="wait" assertions="0" time="0.016">
<skipped message="used internally" />
</testcase>
</testsuite>
<testsuite name="love.filesystem" tests="29" failures="0" skipped="2" time="0.561">
<testcase classname="File" name="File" assertions="36" time="0.018">
<testsuite name="love.filesystem" tests="29" failures="0" skipped="2" time="0.539">
<testcase classname="File" name="File" assertions="36" time="0.020">
</testcase>
<testcase classname="FileData" name="FileData" assertions="12" time="0.019">
<testcase classname="FileData" name="FileData" assertions="12" time="0.016">
</testcase>
<testcase classname="append" name="append" assertions="6" time="0.020">
<testcase classname="append" name="append" assertions="6" time="0.022">
</testcase>
<testcase classname="areSymlinksEnabled" name="areSymlinksEnabled" assertions="1" time="0.017">
</testcase>
<testcase classname="createDirectory" name="createDirectory" assertions="3" time="0.019">
<testcase classname="createDirectory" name="createDirectory" assertions="3" time="0.017">
</testcase>
<testcase classname="getAppdataDirectory" name="getAppdataDirectory" assertions="1" time="0.018">
<testcase classname="getAppdataDirectory" name="getAppdataDirectory" assertions="1" time="0.016">
</testcase>
<testcase classname="getCRequirePath" name="getCRequirePath" assertions="1" time="0.017">
</testcase>
<testcase classname="getDirectoryItems" name="getDirectoryItems" assertions="2" time="0.018">
<testcase classname="getDirectoryItems" name="getDirectoryItems" assertions="2" time="0.019">
</testcase>
<testcase classname="getIdentity" name="getIdentity" assertions="1" time="0.018">
<testcase classname="getIdentity" name="getIdentity" assertions="1" time="0.017">
</testcase>
<testcase classname="getInfo" name="getInfo" assertions="3" time="0.019">
<testcase classname="getInfo" name="getInfo" assertions="3" time="0.018">
</testcase>
<testcase classname="getRealDirectory" name="getRealDirectory" assertions="1" time="0.018">
<testcase classname="getRealDirectory" name="getRealDirectory" assertions="1" time="0.017">
</testcase>
<testcase classname="getRequirePath" name="getRequirePath" assertions="1" time="0.017">
</testcase>
<testcase classname="getSaveDirectory" name="getSaveDirectory" assertions="1" time="0.017">
</testcase>
<testcase classname="getSource" name="getSource" assertions="0" time="0.016">
<testcase classname="getSource" name="getSource" assertions="0" time="0.017">
<skipped message="used internally" />
</testcase>
<testcase classname="getSourceBaseDirectory" name="getSourceBaseDirectory" assertions="1" time="0.018">
<testcase classname="getSourceBaseDirectory" name="getSourceBaseDirectory" assertions="1" time="0.017">
</testcase>
<testcase classname="getUserDirectory" name="getUserDirectory" assertions="1" time="0.017">
<testcase classname="getUserDirectory" name="getUserDirectory" assertions="1" time="0.018">
</testcase>
<testcase classname="getWorkingDirectory" name="getWorkingDirectory" assertions="1" time="0.018">
<testcase classname="getWorkingDirectory" name="getWorkingDirectory" assertions="1" time="0.021">
</testcase>
<testcase classname="isFused" name="isFused" assertions="1" time="0.018">
<testcase classname="isFused" name="isFused" assertions="1" time="0.014">
</testcase>
<testcase classname="lines" name="lines" assertions="6" time="0.022">
<testcase classname="lines" name="lines" assertions="6" time="0.017">
</testcase>
<testcase classname="load" name="load" assertions="4" time="0.017">
<testcase classname="load" name="load" assertions="4" time="0.018">
</testcase>
<testcase classname="mount" name="mount" assertions="5" time="0.018">
</testcase>
<testcase classname="newFileData" name="newFileData" assertions="1" time="0.018">
</testcase>
<testcase classname="openFile" name="openFile" assertions="4" time="0.018">
<testcase classname="openFile" name="openFile" assertions="4" time="0.016">
</testcase>
<testcase classname="read" name="read" assertions="6" time="0.018">
<testcase classname="read" name="read" assertions="6" time="0.016">
</testcase>
<testcase classname="remove" name="remove" assertions="5" time="0.018">
<testcase classname="remove" name="remove" assertions="5" time="0.017">
</testcase>
<testcase classname="setCRequirePath" name="setCRequirePath" assertions="1" time="0.018">
<testcase classname="setCRequirePath" name="setCRequirePath" assertions="1" time="0.016">
</testcase>
<testcase classname="setIdentity" name="setIdentity" assertions="1" time="0.019">
<testcase classname="setIdentity" name="setIdentity" assertions="1" time="0.016">
</testcase>
<testcase classname="setRequirePath" name="setRequirePath" assertions="1" time="0.019">
<testcase classname="setRequirePath" name="setRequirePath" assertions="1" time="0.015">
</testcase>
<testcase classname="setSource" name="setSource" assertions="0" time="0.017">
<skipped message="used internally" />
@@ -166,507 +165,496 @@
<testcase classname="write" name="write" assertions="3" time="0.019">
</testcase>
</testsuite>
<testsuite name="love.font" tests="6" failures="1" skipped="0" time="0.123">
<testcase classname="GlyphData" name="GlyphData" assertions="19" time="0.017">
<testsuite name="love.font" tests="6" failures="1" skipped="0" time="0.121">
<testcase classname="GlyphData" name="GlyphData" assertions="19" time="0.016">
<failure message="assert 8 [check glyph number] expected '97' got '0'">assert 8 [check glyph number] expected '97' got '0'</failure>
</testcase>
<testcase classname="Rasterizer" name="Rasterizer" assertions="13" time="0.018">
<testcase classname="Rasterizer" name="Rasterizer" assertions="13" time="0.016">
</testcase>
<testcase classname="newBMFontRasterizer" name="newBMFontRasterizer" assertions="3" time="0.018">
<testcase classname="newBMFontRasterizer" name="newBMFontRasterizer" assertions="3" time="0.017">
</testcase>
<testcase classname="newGlyphData" name="newGlyphData" assertions="3" time="0.018">
</testcase>
<testcase classname="newImageRasterizer" name="newImageRasterizer" assertions="3" time="0.018">
</testcase>
<testcase classname="newRasterizer" name="newRasterizer" assertions="3" time="0.017">
<testcase classname="newRasterizer" name="newRasterizer" assertions="3" time="0.018">
</testcase>
<testcase classname="newTrueTypeRasterizer" name="newTrueTypeRasterizer" assertions="6" time="0.019">
<testcase classname="newTrueTypeRasterizer" name="newTrueTypeRasterizer" assertions="6" time="0.018">
</testcase>
</testsuite>
<testsuite name="love.graphics" tests="93" failures="0" skipped="14" time="2.106">
<testcase classname="Canvas" name="Canvas" assertions="0" time="0.017">
<skipped message="test class needs writing" />
<testsuite name="love.graphics" tests="98" failures="1" skipped="6" time="2.029">
<testcase classname="Canvas" name="Canvas" assertions="44" time="0.018">
<failure message="assert 44 [check depth sample mode set] expected 'equal' got 'nil'">assert 44 [check depth sample mode set] expected 'equal' got 'nil'</failure>
</testcase>
<testcase classname="Font" name="Font" assertions="0" time="0.018">
<skipped message="test class needs writing" />
<testcase classname="Font" name="Font" assertions="90" time="0.023">
</testcase>
<testcase classname="Image" name="Image" assertions="0" time="0.017">
<skipped message="test class needs writing" />
<testcase classname="Image" name="Image" assertions="40" time="0.020">
</testcase>
<testcase classname="Mesh" name="Mesh" assertions="0" time="0.017">
<testcase classname="Mesh" name="Mesh" assertions="0" time="0.018">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="ParticleSystem" name="ParticleSystem" assertions="0" time="0.017">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="Quad" name="Quad" assertions="0" time="0.017">
<testcase classname="Quad" name="Quad" assertions="47" time="0.020">
</testcase>
<testcase classname="Shader" name="Shader" assertions="39" time="0.029">
</testcase>
<testcase classname="SpriteBatch" name="SpriteBatch" assertions="0" time="0.016">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="Shader" name="Shader" assertions="0" time="0.018">
<testcase classname="Text" name="Text" assertions="90" time="0.014">
</testcase>
<testcase classname="Video" name="Video" assertions="0" time="0.015">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="SpriteBatch" name="SpriteBatch" assertions="0" time="0.018">
<skipped message="test class needs writing" />
<testcase classname="applyTransform" name="applyTransform" assertions="4" time="0.018">
</testcase>
<testcase classname="Text" name="Text" assertions="0" time="0.018">
<skipped message="test class needs writing" />
<testcase classname="arc" name="arc" assertions="264" time="0.026">
</testcase>
<testcase classname="Texture" name="Texture" assertions="0" time="0.018">
<skipped message="test class needs writing" />
<testcase classname="captureScreenshot" name="captureScreenshot" assertions="1" time="0.183">
</testcase>
<testcase classname="Video" name="Video" assertions="0" time="0.007">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="applyTransform" name="applyTransform" assertions="4" time="0.019">
</testcase>
<testcase classname="arc" name="arc" assertions="264" time="0.024">
</testcase>
<testcase classname="captureScreenshot" name="captureScreenshot" assertions="1" time="0.184">
</testcase>
<testcase classname="circle" name="circle" assertions="192" time="0.021">
<testcase classname="circle" name="circle" assertions="192" time="0.023">
</testcase>
<testcase classname="clear" name="clear" assertions="20" time="0.018">
</testcase>
<testcase classname="discard" name="discard" assertions="0" time="0.016">
<testcase classname="discard" name="discard" assertions="0" time="0.017">
<skipped message="cant test this worked" />
</testcase>
<testcase classname="draw" name="draw" assertions="112" time="0.018">
<testcase classname="draw" name="draw" assertions="112" time="0.034">
</testcase>
<testcase classname="drawInstanced" name="drawInstanced" assertions="0" time="0.018">
<testcase classname="drawInstanced" name="drawInstanced" assertions="0" time="0.014">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="drawLayer" name="drawLayer" assertions="144" time="0.020">
<testcase classname="drawLayer" name="drawLayer" assertions="144" time="0.017">
</testcase>
<testcase classname="ellipse" name="ellipse" assertions="80" time="0.018">
</testcase>
<testcase classname="flushBatch" name="flushBatch" assertions="1" time="0.017">
<testcase classname="flushBatch" name="flushBatch" assertions="1" time="0.016">
</testcase>
<testcase classname="getBackgroundColor" name="getBackgroundColor" assertions="8" time="0.018">
<testcase classname="getBackgroundColor" name="getBackgroundColor" assertions="8" time="0.016">
</testcase>
<testcase classname="getBlendMode" name="getBlendMode" assertions="4" time="0.018">
<testcase classname="getBlendMode" name="getBlendMode" assertions="4" time="0.016">
</testcase>
<testcase classname="getCanvas" name="getCanvas" assertions="4" time="0.019">
<testcase classname="getCanvas" name="getCanvas" assertions="4" time="0.016">
</testcase>
<testcase classname="getColor" name="getColor" assertions="8" time="0.017">
<testcase classname="getColor" name="getColor" assertions="8" time="0.016">
</testcase>
<testcase classname="getColorMask" name="getColorMask" assertions="8" time="0.018">
<testcase classname="getColorMask" name="getColorMask" assertions="8" time="0.015">
</testcase>
<testcase classname="getDPIScale" name="getDPIScale" assertions="1" time="0.017">
<testcase classname="getDPIScale" name="getDPIScale" assertions="1" time="0.016">
</testcase>
<testcase classname="getDefaultFilter" name="getDefaultFilter" assertions="3" time="0.018">
<testcase classname="getDefaultFilter" name="getDefaultFilter" assertions="3" time="0.016">
</testcase>
<testcase classname="getDepthMode" name="getDepthMode" assertions="2" time="0.017">
<testcase classname="getDepthMode" name="getDepthMode" assertions="2" time="0.016">
</testcase>
<testcase classname="getDimensions" name="getDimensions" assertions="2" time="0.018">
<testcase classname="getDimensions" name="getDimensions" assertions="2" time="0.016">
</testcase>
<testcase classname="getFont" name="getFont" assertions="3" time="0.019">
<testcase classname="getFont" name="getFont" assertions="3" time="0.016">
</testcase>
<testcase classname="getFrontFaceWinding" name="getFrontFaceWinding" assertions="2" time="0.017">
<testcase classname="getFrontFaceWinding" name="getFrontFaceWinding" assertions="2" time="0.016">
</testcase>
<testcase classname="getHeight" name="getHeight" assertions="1" time="0.017">
<testcase classname="getHeight" name="getHeight" assertions="1" time="0.015">
</testcase>
<testcase classname="getLineJoin" name="getLineJoin" assertions="2" time="0.017">
<testcase classname="getLineJoin" name="getLineJoin" assertions="2" time="0.016">
</testcase>
<testcase classname="getLineStyle" name="getLineStyle" assertions="2" time="0.020">
<testcase classname="getLineStyle" name="getLineStyle" assertions="2" time="0.025">
</testcase>
<testcase classname="getLineWidth" name="getLineWidth" assertions="2" time="0.016">
<testcase classname="getLineWidth" name="getLineWidth" assertions="2" time="0.018">
</testcase>
<testcase classname="getMeshCullMode" name="getMeshCullMode" assertions="2" time="0.016">
</testcase>
<testcase classname="getPixelDimensions" name="getPixelDimensions" assertions="2" time="0.018">
<testcase classname="getPixelDimensions" name="getPixelDimensions" assertions="2" time="0.016">
</testcase>
<testcase classname="getPixelHeight" name="getPixelHeight" assertions="1" time="0.018">
<testcase classname="getPixelHeight" name="getPixelHeight" assertions="1" time="0.024">
</testcase>
<testcase classname="getPixelWidth" name="getPixelWidth" assertions="1" time="0.018">
<testcase classname="getPixelWidth" name="getPixelWidth" assertions="1" time="0.013">
</testcase>
<testcase classname="getPointSize" name="getPointSize" assertions="2" time="0.016">
</testcase>
<testcase classname="getRendererInfo" name="getRendererInfo" assertions="4" time="0.019">
<testcase classname="getRendererInfo" name="getRendererInfo" assertions="4" time="0.016">
</testcase>
<testcase classname="getScissor" name="getScissor" assertions="8" time="0.017">
<testcase classname="getScissor" name="getScissor" assertions="8" time="0.016">
</testcase>
<testcase classname="getShader" name="getShader" assertions="1" time="0.019">
<testcase classname="getShader" name="getShader" assertions="1" time="0.017">
</testcase>
<testcase classname="getStackDepth" name="getStackDepth" assertions="4" time="0.018">
<testcase classname="getStackDepth" name="getStackDepth" assertions="4" time="0.016">
</testcase>
<testcase classname="getStats" name="getStats" assertions="7" time="0.018">
<testcase classname="getStats" name="getStats" assertions="7" time="0.015">
</testcase>
<testcase classname="getStencilMode" name="getStencilMode" assertions="6" time="0.017">
<testcase classname="getStencilMode" name="getStencilMode" assertions="6" time="0.016">
</testcase>
<testcase classname="getSupported" name="getSupported" assertions="17" time="0.018">
<testcase classname="getSupported" name="getSupported" assertions="17" time="0.015">
</testcase>
<testcase classname="getSystemLimits" name="getSystemLimits" assertions="13" time="0.018">
<testcase classname="getSystemLimits" name="getSystemLimits" assertions="13" time="0.015">
</testcase>
<testcase classname="getTextureFormats" name="getTextureFormats" assertions="79" time="0.019">
<testcase classname="getTextureFormats" name="getTextureFormats" assertions="79" time="0.017">
</testcase>
<testcase classname="getTextureTypes" name="getTextureTypes" assertions="4" time="0.018">
<testcase classname="getTextureTypes" name="getTextureTypes" assertions="4" time="0.016">
</testcase>
<testcase classname="getWidth" name="getWidth" assertions="1" time="0.017">
<testcase classname="getWidth" name="getWidth" assertions="1" time="0.015">
</testcase>
<testcase classname="intersectScissor" name="intersectScissor" assertions="20" time="0.019">
<testcase classname="intersectScissor" name="intersectScissor" assertions="20" time="0.017">
</testcase>
<testcase classname="inverseTransformPoint" name="inverseTransformPoint" assertions="4" time="0.017">
<testcase classname="inverseTransformPoint" name="inverseTransformPoint" assertions="4" time="0.016">
</testcase>
<testcase classname="isActive" name="isActive" assertions="1" time="0.017">
<testcase classname="isActive" name="isActive" assertions="1" time="0.016">
</testcase>
<testcase classname="isGammaCorrect" name="isGammaCorrect" assertions="1" time="0.018">
<testcase classname="isGammaCorrect" name="isGammaCorrect" assertions="1" time="0.015">
</testcase>
<testcase classname="isWireframe" name="isWireframe" assertions="2" time="0.018">
<testcase classname="isWireframe" name="isWireframe" assertions="2" time="0.015">
</testcase>
<testcase classname="line" name="line" assertions="64" time="0.019">
<testcase classname="line" name="line" assertions="64" time="0.017">
</testcase>
<testcase classname="newArrayImage" name="newArrayImage" assertions="3" time="0.019">
<testcase classname="newArrayImage" name="newArrayImage" assertions="3" time="0.016">
</testcase>
<testcase classname="newCanvas" name="newCanvas" assertions="6" time="0.015">
</testcase>
<testcase classname="newCubeImage" name="newCubeImage" assertions="3" time="0.020">
<testcase classname="newCubeImage" name="newCubeImage" assertions="3" time="0.017">
</testcase>
<testcase classname="newFont" name="newFont" assertions="6" time="0.018">
<testcase classname="newFont" name="newFont" assertions="6" time="0.017">
</testcase>
<testcase classname="newImage" name="newImage" assertions="3" time="0.017">
</testcase>
<testcase classname="newImageFont" name="newImageFont" assertions="3" time="0.019">
<testcase classname="newImageFont" name="newImageFont" assertions="3" time="0.016">
</testcase>
<testcase classname="newMesh" name="newMesh" assertions="3" time="0.018">
<testcase classname="newMesh" name="newMesh" assertions="3" time="0.016">
</testcase>
<testcase classname="newParticleSystem" name="newParticleSystem" assertions="3" time="0.018">
<testcase classname="newParticleSystem" name="newParticleSystem" assertions="3" time="0.017">
</testcase>
<testcase classname="newQuad" name="newQuad" assertions="3" time="0.017">
<testcase classname="newQuad" name="newQuad" assertions="3" time="0.016">
</testcase>
<testcase classname="newShader" name="newShader" assertions="3" time="0.022">
</testcase>
<testcase classname="newSpriteBatch" name="newSpriteBatch" assertions="3" time="0.019">
<testcase classname="newSpriteBatch" name="newSpriteBatch" assertions="3" time="0.017">
</testcase>
<testcase classname="newTextBatch" name="newTextBatch" assertions="3" time="0.016">
<testcase classname="newTextBatch" name="newTextBatch" assertions="3" time="0.011">
</testcase>
<testcase classname="newVideo" name="newVideo" assertions="3" time="0.021">
<testcase classname="newVideo" name="newVideo" assertions="3" time="0.019">
</testcase>
<testcase classname="newVolumeImage" name="newVolumeImage" assertions="3" time="0.019">
<testcase classname="newVolumeImage" name="newVolumeImage" assertions="3" time="0.018">
</testcase>
<testcase classname="origin" name="origin" assertions="4" time="0.018">
</testcase>
<testcase classname="points" name="points" assertions="48" time="0.019">
<testcase classname="points" name="points" assertions="48" time="0.020">
</testcase>
<testcase classname="polygon" name="polygon" assertions="56" time="0.016">
<testcase classname="polygon" name="polygon" assertions="56" time="0.021">
</testcase>
<testcase classname="pop" name="pop" assertions="4" time="0.019">
<testcase classname="pop" name="pop" assertions="4" time="0.018">
</testcase>
<testcase classname="present" name="present" assertions="0" time="0.018">
<skipped message="test class needs writing" />
<testcase classname="print" name="print" assertions="148" time="0.020">
</testcase>
<testcase classname="print" name="print" assertions="148" time="0.019">
<testcase classname="printf" name="printf" assertions="180" time="0.020">
</testcase>
<testcase classname="printf" name="printf" assertions="180" time="0.019">
<testcase classname="push" name="push" assertions="4" time="0.018">
</testcase>
<testcase classname="push" name="push" assertions="4" time="0.021">
<testcase classname="rectangle" name="rectangle" assertions="116" time="0.020">
</testcase>
<testcase classname="rectangle" name="rectangle" assertions="116" time="0.018">
<testcase classname="replaceTransform" name="replaceTransform" assertions="4" time="0.018">
</testcase>
<testcase classname="replaceTransform" name="replaceTransform" assertions="4" time="0.017">
<testcase classname="reset" name="reset" assertions="3" time="0.018">
</testcase>
<testcase classname="reset" name="reset" assertions="3" time="0.017">
<testcase classname="rotate" name="rotate" assertions="16" time="0.018">
</testcase>
<testcase classname="rotate" name="rotate" assertions="16" time="0.020">
</testcase>
<testcase classname="scale" name="scale" assertions="16" time="0.020">
<testcase classname="scale" name="scale" assertions="16" time="0.017">
</testcase>
<testcase classname="setBackgroundColor" name="setBackgroundColor" assertions="4" time="0.017">
</testcase>
<testcase classname="setBlendMode" name="setBlendMode" assertions="16" time="0.020">
<testcase classname="setBlendMode" name="setBlendMode" assertions="16" time="0.019">
</testcase>
<testcase classname="setCanvas" name="setCanvas" assertions="19" time="0.019">
<testcase classname="setCanvas" name="setCanvas" assertions="19" time="0.018">
</testcase>
<testcase classname="setColor" name="setColor" assertions="68" time="0.018">
</testcase>
<testcase classname="setColorMask" name="setColorMask" assertions="20" time="0.019">
</testcase>
<testcase classname="setDefaultFilter" name="setDefaultFilter" assertions="3" time="0.018">
<testcase classname="setDefaultFilter" name="setDefaultFilter" assertions="3" time="0.017">
</testcase>
<testcase classname="setDepthMode" name="setDepthMode" assertions="8" time="0.018">
<testcase classname="setDepthMode" name="setDepthMode" assertions="8" time="0.017">
</testcase>
<testcase classname="setFont" name="setFont" assertions="40" time="0.018">
<testcase classname="setFont" name="setFont" assertions="40" time="0.019">
</testcase>
<testcase classname="setFrontFaceWinding" name="setFrontFaceWinding" assertions="2" time="0.018">
<testcase classname="setFrontFaceWinding" name="setFrontFaceWinding" assertions="2" time="0.017">
</testcase>
<testcase classname="setLineJoin" name="setLineJoin" assertions="16" time="0.020">
<testcase classname="setLineJoin" name="setLineJoin" assertions="16" time="0.018">
</testcase>
<testcase classname="setLineStyle" name="setLineStyle" assertions="24" time="0.017">
<testcase classname="setLineStyle" name="setLineStyle" assertions="24" time="0.018">
</testcase>
<testcase classname="setLineWidth" name="setLineWidth" assertions="72" time="0.018">
<testcase classname="setLineWidth" name="setLineWidth" assertions="72" time="0.019">
</testcase>
<testcase classname="setMeshCullMode" name="setMeshCullMode" assertions="3" time="0.018">
</testcase>
<testcase classname="setScissor" name="setScissor" assertions="32" time="0.018">
<testcase classname="setScissor" name="setScissor" assertions="32" time="0.020">
</testcase>
<testcase classname="setShader" name="setShader" assertions="16" time="0.024">
<testcase classname="setShader" name="setShader" assertions="16" time="0.023">
</testcase>
<testcase classname="setStencilTest" name="setStencilTest" assertions="32" time="0.018">
<testcase classname="setStencilTest" name="setStencilTest" assertions="32" time="0.019">
</testcase>
<testcase classname="setWireframe" name="setWireframe" assertions="28" time="0.019">
<testcase classname="setWireframe" name="setWireframe" assertions="28" time="0.018">
</testcase>
<testcase classname="shear" name="shear" assertions="32" time="0.021">
<testcase classname="shear" name="shear" assertions="32" time="0.019">
</testcase>
<testcase classname="transformPoint" name="transformPoint" assertions="4" time="0.016">
<testcase classname="transformPoint" name="transformPoint" assertions="4" time="0.018">
</testcase>
<testcase classname="translate" name="translate" assertions="16" time="0.020">
<testcase classname="translate" name="translate" assertions="16" time="0.025">
</testcase>
<testcase classname="validateShader" name="validateShader" assertions="2" time="0.021">
<testcase classname="validateShader" name="validateShader" assertions="2" time="0.016">
</testcase>
</testsuite>
<testsuite name="love.image" tests="5" failures="0" skipped="0" time="0.088">
<testsuite name="love.image" tests="5" failures="0" skipped="0" time="0.087">
<testcase classname="CompressedImageData" name="CompressedImageData" assertions="11" time="0.018">
</testcase>
<testcase classname="ImageData" name="ImageData" assertions="14" time="0.018">
<testcase classname="ImageData" name="ImageData" assertions="14" time="0.017">
</testcase>
<testcase classname="isCompressed" name="isCompressed" assertions="1" time="0.017">
</testcase>
<testcase classname="newCompressedData" name="newCompressedData" assertions="3" time="0.018">
<testcase classname="newCompressedData" name="newCompressedData" assertions="3" time="0.019">
</testcase>
<testcase classname="newImageData" name="newImageData" assertions="6" time="0.018">
<testcase classname="newImageData" name="newImageData" assertions="6" time="0.017">
</testcase>
</testsuite>
<testsuite name="love.math" tests="20" failures="0" skipped="0" time="0.284">
<testcase classname="BezierCurve" name="BezierCurve" assertions="31" time="0.016">
<testsuite name="love.math" tests="20" failures="0" skipped="0" time="0.321">
<testcase classname="BezierCurve" name="BezierCurve" assertions="31" time="0.018">
</testcase>
<testcase classname="RandomGenerator" name="RandomGenerator" assertions="10" time="0.017">
</testcase>
<testcase classname="Transform" name="Transform" assertions="14" time="0.017">
</testcase>
<testcase classname="colorFromBytes" name="colorFromBytes" assertions="12" time="0.018">
<testcase classname="colorFromBytes" name="colorFromBytes" assertions="12" time="0.017">
</testcase>
<testcase classname="colorToBytes" name="colorToBytes" assertions="12" time="0.018">
<testcase classname="colorToBytes" name="colorToBytes" assertions="12" time="0.016">
</testcase>
<testcase classname="gammaToLinear" name="gammaToLinear" assertions="3" time="0.017">
<testcase classname="gammaToLinear" name="gammaToLinear" assertions="3" time="0.016">
</testcase>
<testcase classname="getRandomSeed" name="getRandomSeed" assertions="2" time="0.017">
<testcase classname="getRandomSeed" name="getRandomSeed" assertions="2" time="0.016">
</testcase>
<testcase classname="getRandomState" name="getRandomState" assertions="1" time="0.018">
<testcase classname="getRandomState" name="getRandomState" assertions="1" time="0.016">
</testcase>
<testcase classname="isConvex" name="isConvex" assertions="2" time="0.018">
<testcase classname="isConvex" name="isConvex" assertions="2" time="0.016">
</testcase>
<testcase classname="linearToGamma" name="linearToGamma" assertions="3" time="0.018">
<testcase classname="linearToGamma" name="linearToGamma" assertions="3" time="0.017">
</testcase>
<testcase classname="newBezierCurve" name="newBezierCurve" assertions="3" time="0.018">
<testcase classname="newBezierCurve" name="newBezierCurve" assertions="3" time="0.016">
</testcase>
<testcase classname="newRandomGenerator" name="newRandomGenerator" assertions="3" time="0.018">
<testcase classname="newRandomGenerator" name="newRandomGenerator" assertions="3" time="0.016">
</testcase>
<testcase classname="newTransform" name="newTransform" assertions="3" time="0.017">
<testcase classname="newTransform" name="newTransform" assertions="3" time="0.016">
</testcase>
<testcase classname="perlinNoise" name="perlinNoise" assertions="4" time="0.019">
<testcase classname="perlinNoise" name="perlinNoise" assertions="4" time="0.015">
</testcase>
<testcase classname="random" name="random" assertions="10" time="0.012">
<testcase classname="random" name="random" assertions="10" time="0.016">
</testcase>
<testcase classname="randomNormal" name="randomNormal" assertions="1" time="0.017">
<testcase classname="randomNormal" name="randomNormal" assertions="1" time="0.014">
</testcase>
<testcase classname="setRandomSeed" name="setRandomSeed" assertions="2" time="0.002">
<testcase classname="setRandomSeed" name="setRandomSeed" assertions="2" time="0.015">
</testcase>
<testcase classname="setRandomState" name="setRandomState" assertions="1" time="0.002">
<testcase classname="setRandomState" name="setRandomState" assertions="1" time="0.015">
</testcase>
<testcase classname="simplexNoise" name="simplexNoise" assertions="4" time="0.002">
<testcase classname="simplexNoise" name="simplexNoise" assertions="4" time="0.016">
</testcase>
<testcase classname="triangulate" name="triangulate" assertions="2" time="0.003">
<testcase classname="triangulate" name="triangulate" assertions="2" time="0.016">
</testcase>
</testsuite>
<testsuite name="love.physics" tests="22" failures="0" skipped="6" time="0.059">
<testcase classname="Body" name="Body" assertions="0" time="0.002">
<testsuite name="love.physics" tests="22" failures="0" skipped="6" time="0.468">
<testcase classname="Body" name="Body" assertions="0" time="0.018">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="Contact" name="Contact" assertions="0" time="0.002">
<testcase classname="Contact" name="Contact" assertions="0" time="0.017">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="Fixture" name="Fixture" assertions="0" time="0.002">
<testcase classname="Fixture" name="Fixture" assertions="0" time="0.026">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="Joint" name="Joint" assertions="0" time="0.002">
<testcase classname="Joint" name="Joint" assertions="0" time="0.017">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="Shape" name="Shape" assertions="0" time="0.002">
<testcase classname="Shape" name="Shape" assertions="0" time="0.017">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="World" name="World" assertions="0" time="0.002">
<testcase classname="World" name="World" assertions="0" time="0.017">
<skipped message="test class needs writing" />
</testcase>
<testcase classname="getDistance" name="getDistance" assertions="1" time="0.002">
<testcase classname="getDistance" name="getDistance" assertions="1" time="0.017">
</testcase>
<testcase classname="getMeter" name="getMeter" assertions="1" time="0.002">
<testcase classname="getMeter" name="getMeter" assertions="1" time="0.015">
</testcase>
<testcase classname="newBody" name="newBody" assertions="3" time="0.002">
<testcase classname="newBody" name="newBody" assertions="3" time="0.016">
</testcase>
<testcase classname="newChainShape" name="newChainShape" assertions="3" time="0.002">
<testcase classname="newChainShape" name="newChainShape" assertions="3" time="0.016">
</testcase>
<testcase classname="newCircleShape" name="newCircleShape" assertions="3" time="0.005">
<testcase classname="newCircleShape" name="newCircleShape" assertions="3" time="0.017">
</testcase>
<testcase classname="newDistanceJoint" name="newDistanceJoint" assertions="3" time="0.002">
<testcase classname="newDistanceJoint" name="newDistanceJoint" assertions="3" time="0.016">
</testcase>
<testcase classname="newEdgeShape" name="newEdgeShape" assertions="3" time="0.002">
<testcase classname="newEdgeShape" name="newEdgeShape" assertions="3" time="0.017">
</testcase>
<testcase classname="newFixture" name="newFixture" assertions="3" time="0.002">
<testcase classname="newFixture" name="newFixture" assertions="3" time="0.016">
</testcase>
<testcase classname="newFrictionJoint" name="newFrictionJoint" assertions="3" time="0.002">
<testcase classname="newFrictionJoint" name="newFrictionJoint" assertions="3" time="0.016">
</testcase>
<testcase classname="newGearJoint" name="newGearJoint" assertions="3" time="0.002">
<testcase classname="newGearJoint" name="newGearJoint" assertions="3" time="0.016">
</testcase>
<testcase classname="newMotorJoint" name="newMotorJoint" assertions="3" time="0.002">
<testcase classname="newMotorJoint" name="newMotorJoint" assertions="3" time="0.016">
</testcase>
<testcase classname="newMouseJoint" name="newMouseJoint" assertions="3" time="0.002">
<testcase classname="newMouseJoint" name="newMouseJoint" assertions="3" time="0.018">
</testcase>
<testcase classname="newPolygonShape" name="newPolygonShape" assertions="3" time="0.002">
<testcase classname="newPolygonShape" name="newPolygonShape" assertions="3" time="0.016">
</testcase>
<testcase classname="newPrismaticJoint" name="newPrismaticJoint" assertions="3" time="0.002">
<testcase classname="newPrismaticJoint" name="newPrismaticJoint" assertions="3" time="0.017">
</testcase>
<testcase classname="newPulleyJoint" name="newPulleyJoint" assertions="3" time="0.002">
<testcase classname="newPulleyJoint" name="newPulleyJoint" assertions="3" time="0.016">
</testcase>
<testcase classname="newRectangleShape" name="newRectangleShape" assertions="6" time="0.002">
<testcase classname="newRectangleShape" name="newRectangleShape" assertions="6" time="0.017">
</testcase>
<testcase classname="newRevoluteJoint" name="newRevoluteJoint" assertions="3" time="0.002">
<testcase classname="newRevoluteJoint" name="newRevoluteJoint" assertions="3" time="0.015">
</testcase>
<testcase classname="newRopeJoint" name="newRopeJoint" assertions="3" time="0.002">
<testcase classname="newRopeJoint" name="newRopeJoint" assertions="3" time="0.016">
</testcase>
<testcase classname="newWeldJoint" name="newWeldJoint" assertions="3" time="0.002">
<testcase classname="newWeldJoint" name="newWeldJoint" assertions="3" time="0.015">
</testcase>
<testcase classname="newWheelJoint" name="newWheelJoint" assertions="3" time="0.002">
<testcase classname="newWheelJoint" name="newWheelJoint" assertions="3" time="0.016">
</testcase>
<testcase classname="newWorld" name="newWorld" assertions="3" time="0.002">
<testcase classname="newWorld" name="newWorld" assertions="3" time="0.014">
</testcase>
<testcase classname="setMeter" name="setMeter" assertions="2" time="0.002">
<testcase classname="setMeter" name="setMeter" assertions="2" time="0.015">
</testcase>
</testsuite>
<testsuite name="love.sound" tests="4" failures="0" skipped="0" time="0.015">
<testcase classname="Decoder" name="Decoder" assertions="14" time="0.007">
<testsuite name="love.sound" tests="4" failures="0" skipped="0" time="0.068">
<testcase classname="Decoder" name="Decoder" assertions="14" time="0.018">
</testcase>
<testcase classname="SoundData" name="SoundData" assertions="20" time="0.003">
<testcase classname="SoundData" name="SoundData" assertions="20" time="0.017">
</testcase>
<testcase classname="newDecoder" name="newDecoder" assertions="3" time="0.002">
<testcase classname="newDecoder" name="newDecoder" assertions="3" time="0.016">
</testcase>
<testcase classname="newSoundData" name="newSoundData" assertions="6" time="0.003">
<testcase classname="newSoundData" name="newSoundData" assertions="6" time="0.017">
</testcase>
</testsuite>
<testsuite name="love.system" tests="6" failures="0" skipped="2" time="0.023">
<testcase classname="getClipboardText" name="getClipboardText" assertions="1" time="0.004">
<testsuite name="love.system" tests="6" failures="0" skipped="2" time="0.148">
<testcase classname="getClipboardText" name="getClipboardText" assertions="1" time="0.019">
</testcase>
<testcase classname="getOS" name="getOS" assertions="1" time="0.007">
<testcase classname="getOS" name="getOS" assertions="1" time="0.017">
</testcase>
<testcase classname="getPowerInfo" name="getPowerInfo" assertions="1" time="0.002">
<testcase classname="getPowerInfo" name="getPowerInfo" assertions="1" time="0.017">
</testcase>
<testcase classname="getProcessorCount" name="getProcessorCount" assertions="1" time="0.002">
<testcase classname="getProcessorCount" name="getProcessorCount" assertions="1" time="0.016">
</testcase>
<testcase classname="hasBackgroundMusic" name="hasBackgroundMusic" assertions="1" time="0.002">
<testcase classname="hasBackgroundMusic" name="hasBackgroundMusic" assertions="1" time="0.029">
</testcase>
<testcase classname="openURL" name="openURL" assertions="0" time="0.002">
<testcase classname="openURL" name="openURL" assertions="0" time="0.016">
<skipped message="cant test this worked" />
</testcase>
<testcase classname="setClipboardText" name="setClipboardText" assertions="1" time="0.003">
<testcase classname="setClipboardText" name="setClipboardText" assertions="1" time="0.017">
</testcase>
<testcase classname="vibrate" name="vibrate" assertions="0" time="0.002">
<testcase classname="vibrate" name="vibrate" assertions="0" time="0.016">
<skipped message="cant test this worked" />
</testcase>
</testsuite>
<testsuite name="love.thread" tests="5" failures="0" skipped="0" time="0.318">
<testcase classname="Channel" name="Channel" assertions="10" time="0.220">
<testsuite name="love.thread" tests="5" failures="0" skipped="0" time="0.376">
<testcase classname="Channel" name="Channel" assertions="10" time="0.230">
</testcase>
<testcase classname="Thread" name="Thread" assertions="7" time="0.092">
<testcase classname="Thread" name="Thread" assertions="7" time="0.093">
</testcase>
<testcase classname="getChannel" name="getChannel" assertions="3" time="0.002">
<testcase classname="getChannel" name="getChannel" assertions="3" time="0.018">
</testcase>
<testcase classname="newChannel" name="newChannel" assertions="3" time="0.002">
<testcase classname="newChannel" name="newChannel" assertions="3" time="0.017">
</testcase>
<testcase classname="newThread" name="newThread" assertions="3" time="0.002">
<testcase classname="newThread" name="newThread" assertions="3" time="0.018">
</testcase>
</testsuite>
<testsuite name="love.timer" tests="6" failures="0" skipped="0" time="2.020">
<testcase classname="getAverageDelta" name="getAverageDelta" assertions="1" time="0.002">
<testsuite name="love.timer" tests="6" failures="0" skipped="0" time="2.082">
<testcase classname="getAverageDelta" name="getAverageDelta" assertions="1" time="0.017">
</testcase>
<testcase classname="getDelta" name="getDelta" assertions="1" time="0.002">
<testcase classname="getDelta" name="getDelta" assertions="1" time="0.016">
</testcase>
<testcase classname="getFPS" name="getFPS" assertions="1" time="0.002">
<testcase classname="getFPS" name="getFPS" assertions="1" time="0.016">
</testcase>
<testcase classname="getTime" name="getTime" assertions="1" time="1.003">
<testcase classname="getTime" name="getTime" assertions="1" time="1.017">
</testcase>
<testcase classname="sleep" name="sleep" assertions="1" time="1.006">
<testcase classname="sleep" name="sleep" assertions="1" time="1.009">
</testcase>
<testcase classname="step" name="step" assertions="1" time="0.004">
<testcase classname="step" name="step" assertions="1" time="0.005">
</testcase>
</testsuite>
<testsuite name="love.video" tests="2" failures="0" skipped="0" time="0.016">
<testcase classname="VideoStream" name="VideoStream" assertions="9" time="0.009">
<testsuite name="love.video" tests="2" failures="0" skipped="0" time="0.039">
<testcase classname="VideoStream" name="VideoStream" assertions="9" time="0.020">
</testcase>
<testcase classname="newVideoStream" name="newVideoStream" assertions="3" time="0.007">
<testcase classname="newVideoStream" name="newVideoStream" assertions="3" time="0.020">
</testcase>
</testsuite>
<testsuite name="love.window" tests="34" failures="0" skipped="2" time="5.954">
<testcase classname="close" name="close" assertions="2" time="0.054">
<testsuite name="love.window" tests="34" failures="0" skipped="2" time="5.855">
<testcase classname="close" name="close" assertions="2" time="0.052">
</testcase>
<testcase classname="fromPixels" name="fromPixels" assertions="1" time="0.002">
</testcase>
<testcase classname="getDPIScale" name="getDPIScale" assertions="1" time="0.002">
<testcase classname="getDPIScale" name="getDPIScale" assertions="1" time="0.017">
</testcase>
<testcase classname="getDesktopDimensions" name="getDesktopDimensions" assertions="2" time="0.002">
<testcase classname="getDesktopDimensions" name="getDesktopDimensions" assertions="2" time="0.018">
</testcase>
<testcase classname="getDisplayCount" name="getDisplayCount" assertions="1" time="0.002">
<testcase classname="getDisplayCount" name="getDisplayCount" assertions="1" time="0.017">
</testcase>
<testcase classname="getDisplayName" name="getDisplayName" assertions="1" time="0.015">
<testcase classname="getDisplayName" name="getDisplayName" assertions="1" time="0.018">
</testcase>
<testcase classname="getDisplayOrientation" name="getDisplayOrientation" assertions="1" time="0.017">
<testcase classname="getDisplayOrientation" name="getDisplayOrientation" assertions="1" time="0.018">
</testcase>
<testcase classname="getFullscreen" name="getFullscreen" assertions="2" time="1.340">
<testcase classname="getFullscreen" name="getFullscreen" assertions="2" time="1.357">
</testcase>
<testcase classname="getFullscreenModes" name="getFullscreenModes" assertions="1" time="0.009">
<testcase classname="getFullscreenModes" name="getFullscreenModes" assertions="1" time="0.010">
</testcase>
<testcase classname="getIcon" name="getIcon" assertions="2" time="0.019">
</testcase>
<testcase classname="getMode" name="getMode" assertions="3" time="0.014">
<testcase classname="getMode" name="getMode" assertions="3" time="0.015">
</testcase>
<testcase classname="getPosition" name="getPosition" assertions="2" time="0.017">
</testcase>
<testcase classname="getSafeArea" name="getSafeArea" assertions="4" time="0.017">
<testcase classname="getSafeArea" name="getSafeArea" assertions="4" time="0.016">
</testcase>
<testcase classname="getTitle" name="getTitle" assertions="1" time="0.018">
<testcase classname="getTitle" name="getTitle" assertions="1" time="0.017">
</testcase>
<testcase classname="getVSync" name="getVSync" assertions="1" time="0.017">
<testcase classname="getVSync" name="getVSync" assertions="1" time="0.016">
</testcase>
<testcase classname="hasFocus" name="hasFocus" assertions="1" time="0.018">
<testcase classname="hasFocus" name="hasFocus" assertions="1" time="0.016">
</testcase>
<testcase classname="hasMouseFocus" name="hasMouseFocus" assertions="1" time="0.018">
<testcase classname="hasMouseFocus" name="hasMouseFocus" assertions="1" time="0.015">
</testcase>
<testcase classname="isDisplaySleepEnabled" name="isDisplaySleepEnabled" assertions="3" time="0.017">
</testcase>
<testcase classname="isMaximized" name="isMaximized" assertions="2" time="0.186">
<testcase classname="isMaximized" name="isMaximized" assertions="2" time="0.185">
</testcase>
<testcase classname="isMinimized" name="isMinimized" assertions="2" time="0.744">
<testcase classname="isMinimized" name="isMinimized" assertions="2" time="0.749">
</testcase>
<testcase classname="isOpen" name="isOpen" assertions="2" time="0.054">
<testcase classname="isOpen" name="isOpen" assertions="2" time="0.037">
</testcase>
<testcase classname="isVisible" name="isVisible" assertions="2" time="0.031">
<testcase classname="isVisible" name="isVisible" assertions="2" time="0.024">
</testcase>
<testcase classname="maximize" name="maximize" assertions="2" time="0.173">
<testcase classname="maximize" name="maximize" assertions="2" time="0.156">
</testcase>
<testcase classname="minimize" name="minimize" assertions="2" time="0.740">
<testcase classname="minimize" name="minimize" assertions="2" time="0.733">
</testcase>
<testcase classname="requestAttention" name="requestAttention" assertions="0" time="0.003">
<skipped message="cant test this worked" />
</testcase>
<testcase classname="restore" name="restore" assertions="1" time="0.840">
<testcase classname="restore" name="restore" assertions="1" time="0.880">
</testcase>
<testcase classname="setDisplaySleepEnabled" name="setDisplaySleepEnabled" assertions="2" time="0.016">
<testcase classname="setDisplaySleepEnabled" name="setDisplaySleepEnabled" assertions="2" time="0.020">
</testcase>
<testcase classname="setFullscreen" name="setFullscreen" assertions="2" time="1.335">
<testcase classname="setFullscreen" name="setFullscreen" assertions="2" time="1.151">
</testcase>
<testcase classname="setIcon" name="setIcon" assertions="1" time="0.013">
<testcase classname="setIcon" name="setIcon" assertions="1" time="0.007">
</testcase>
<testcase classname="setMode" name="setMode" assertions="4" time="0.021">
<testcase classname="setMode" name="setMode" assertions="4" time="0.023">
</testcase>
<testcase classname="setPosition" name="setPosition" assertions="2" time="0.178">
<testcase classname="setPosition" name="setPosition" assertions="2" time="0.181">
</testcase>
<testcase classname="setTitle" name="setTitle" assertions="1" time="0.003">
<testcase classname="setTitle" name="setTitle" assertions="1" time="0.018">
</testcase>
<testcase classname="setVSync" name="setVSync" assertions="1" time="0.002">
<testcase classname="setVSync" name="setVSync" assertions="1" time="0.015">
</testcase>
<testcase classname="showMessageBox" name="showMessageBox" assertions="0" time="0.002">
<testcase classname="showMessageBox" name="showMessageBox" assertions="0" time="0.003">
<skipped message="cant test this worked" />
</testcase>
<testcase classname="toPixels" name="toPixels" assertions="1" time="0.002">
</testcase>
<testcase classname="updateMode" name="updateMode" assertions="4" time="0.014">
<testcase classname="updateMode" name="updateMode" assertions="4" time="0.011">
</testcase>
</testsuite>
</testsuites>
Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 B

After

Width:  |  Height:  |  Size: 84 B

+13 -17
View File
@@ -23,10 +23,10 @@ This is the status of all module tests currently.
| ----------------- | ---- | ---- | ---- |
| 🟢 audio | 28 | 0 | 0 |
| 🟢 data | 12 | 0 | 0 |
| 🟡 event | 4 | 1 | 1 |
| 🟢 filesystem | 28 | 0 | 2 |
| 🟢 event | 4 | 0 | 2 |
| 🟢 filesystem | 29 | 0 | 2 |
| 🟢 font | 7 | 0 | 0 |
| 🟡 graphics | 93 | 14 | 1 |
| 🟡 graphics | 99 | 5 | 1 |
| 🟢 image | 5 | 0 | 0 |
| 🟢 math | 20 | 0 | 0 |
| 🟡 physics | 22 | 6 | 0 |
@@ -113,24 +113,20 @@ For sanity-checking, if it's currently not covered or it's not possible to test
Things still left to do:
- [ ] physics.Body, physics.Contact, physics.Fixture,
physics.Joint, physics.Shape, physics.World
- [ ] graphics.Canvas, graphics.Font, graphics.Image, graphics.Mesh,
graphics.ParticleSystem, graphics.Quad, graphics.Shader,
graphics.SpriteBatch, graphics.Text, graphics.Texture, graphics.Video
- [ ] event.wait
- [ ] graphics.present
- [ ] graphics.drawInstanced
- [ ] graphics.setDepthMode (needs actual graphical comparison if possible)
- [ ] graphics.setFrontFaceWinding (needs actual graphical comparison if possible)
- [ ] graphics.setMeshCullMode (needs actual graphical comparison if possible)
- [ ] @deprecated setStencilTest (use setStencilMode)
- [ ] @deprecated physics methods (sasha changes)
- [ ] check 12.0 wiki page for new methods
- [ ] need a platform: format table somewhere for compressed formats (i.e. DXT not supported)
- [ ] ideally graphics.isCompressed should have an example of all compressed files love can take
- [ ] graphics.Mesh, graphics.ParticleSystem
graphics.SpriteBatch, graphics.Video
- [ ] graphics.drawInstanced
- [ ] @deprecated love.graphics.stencil (replaced by love.graphics.setStencilMode)
- [ ] @deprecated love.graphics.setStencilTest (replaced by love.graphics.setStencilMode)
---
## Future Goals
- [ ] Tests can compare visual results to a reference image (partially done)
- [ ] graphics.isCompressed should have an example of all compressed files love can take
- [ ] Tests can compare visual results to a reference image
This is partially done as we already save actual images for graphics tests to
use in the report output comparisons, so we just need to add a helper method
to the test class to let you just do assertMatching on the imgdata
- [ ] Ability to test loading different combinations of modules
- [ ] Performance tests
Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

+1 -1
View File
@@ -76,5 +76,5 @@ end
-- love.event.wait
-- @NOTE not sure best way to test this one
love.test.event.wait = function(test)
test:skipTest('test class needs writing')
test:skipTest('used internally')
end
+331 -28
View File
@@ -10,19 +10,221 @@
-- Canvas (love.graphics.newCanvas)
love.test.graphics.Canvas = function(test)
test:skipTest('test class needs writing')
-- create canvas with defaults
local canvas = love.graphics.newCanvas(100, 100, {
type = '2d',
format = 'normal',
readable = true,
msaa = 0,
dpiscale = love.graphics.getDPIScale(),
mipmaps = 'auto'
})
test:assertObject(canvas)
-- check texture settings
test:assertEquals(love.graphics.getDPIScale(), canvas:getDPIScale(), 'check dpi scale')
test:assertEquals(1, canvas:getDepth(), 'check depth is 2d')
test:assertEquals(nil, canvas:getDepthSampleMode(), 'check depth sample nil')
local min, mag, ani = canvas:getFilter()
test:assertEquals('nearest', min, 'check filter def min')
test:assertEquals('nearest', mag, 'check filter def mag')
test:assertEquals(1, ani, 'check filter def ani')
canvas:setFilter('linear', 'linear', 2)
min, mag, ani = canvas:getFilter()
test:assertEquals('linear', min, 'check filter changed min')
test:assertEquals('linear', mag, 'check filter changed mag')
test:assertEquals(2, ani, 'check filter changed ani')
test:assertEquals(1, canvas:getLayerCount(), 'check 1 layer for 2d')
test:assertEquals('2d', canvas:getTextureType(), 'check 2d')
local horiz, vert = canvas:getWrap()
test:assertEquals('clamp', horiz, 'check def wrap h')
test:assertEquals('clamp', vert, 'check def wrap v')
canvas:setWrap('repeat', 'repeat')
horiz, vert = canvas:getWrap()
test:assertEquals('repeat', horiz, 'check changed wrap h')
test:assertEquals('repeat', vert, 'check changed wrap v')
test:assertEquals(true, canvas:isReadable(), 'check canvas readable')
test:assertEquals(1, canvas:getMSAA(), 'check samples match')
-- check dimensions
local cw, ch = canvas:getDimensions()
test:assertEquals(100, cw, 'check canvas dim w')
test:assertEquals(100, ch, 'check canvas dim h')
test:assertEquals(cw, canvas:getWidth(), 'check canvas w matches dim')
test:assertEquals(ch, canvas:getHeight(), 'check canvas h matches dim')
local pw, ph = canvas:getPixelDimensions()
test:assertEquals(100*love.graphics.getDPIScale(), pw, 'check pixel dim w')
test:assertEquals(100*love.graphics.getDPIScale(), ph, 'check pixel dim h')
test:assertEquals(pw, canvas:getPixelWidth(), 'check pixel w matches dim')
test:assertEquals(ph, canvas:getPixelHeight(), 'check pixel h matches dim')
-- check mipmaps
local mode, sharpness = canvas:getMipmapFilter()
test:assertEquals('linear', mode, 'check def minmap filter mode')
test:assertEquals(0, sharpness, 'check def minmap filter sharpness')
canvas:setMipmapFilter('nearest', 1)
mode, sharpness = canvas:getMipmapFilter()
test:assertEquals('nearest', mode, 'check changed minmap filter mode')
test:assertEquals(1, sharpness, 'check changed minmap filter sharpness')
test:assertGreaterEqual(2, canvas:getMipmapCount()) -- docs say no mipmaps should return 1
test:assertEquals('auto', canvas:getMipmapMode())
-- check rendering
canvas:renderTo(function()
love.graphics.setColor(1, 0, 0)
love.graphics.rectangle('fill', 0, 0, 200, 200)
love.graphics.setColor(1, 1, 1, 1)
end)
local data = love.graphics.readbackTexture(canvas, {100, 0, 0, 0, 100, 100})
local r, g, b, a = data:getPixel(2, 2)
test:assertEquals(1, r, 'check canvas draw r')
test:assertEquals(0, g, 'check canvas draw g')
test:assertEquals(0, b, 'check canvas draw b')
test:assertEquals(1, a, 'check canvas draw a')
-- check using canvas in love.graphics.draw()
local xcanvas = love.graphics.newCanvas()
love.graphics.setCanvas(xcanvas)
love.graphics.draw(canvas, 0, 0)
love.graphics.setCanvas()
data = love.graphics.readbackTexture(canvas, {100, 0, 0, 0, 100, 100})
r, g, b, a = data:getPixel(2, 2)
test:assertEquals(1, r, 'check canvas draw r')
test:assertEquals(0, g, 'check canvas draw g')
test:assertEquals(0, b, 'check canvas draw b')
test:assertEquals(1, a, 'check canvas draw a')
-- check depth samples
local dcanvas = love.graphics.newCanvas(100, 100, {
type = '2d',
format = 'depth16'
})
test:assertEquals(nil, dcanvas:getDepthSampleMode(), 'check depth sample mode nil by def')
dcanvas:setDepthSampleMode('equal')
test:assertEquals('equal', dcanvas:getDepthSampleMode(), 'check depth sample mode set')
end
-- Font (love.graphics.newFont)
love.test.graphics.Font = function(test)
test:skipTest('test class needs writing')
-- create obj
local font = love.graphics.newFont('resources/font.ttf', 8)
test:assertObject(font)
-- check properties match expected
test:assertEquals(6, font:getAscent(), 'check ascent')
test:assertEquals(6, font:getBaseline(), 'check baseline')
test:assertEquals(1, font:getDPIScale(), 'check dpi')
test:assertEquals(-2, font:getDescent(), 'check descent')
test:assertEquals('nearest', font:getFilter(), 'check filter def')
font:setFilter('linear', 'linear')
test:assertEquals('linear', font:getFilter(), 'check filter change')
font:setFilter('nearest', 'nearest')
test:assertEquals(8, font:getHeight(), 'check height')
test:assertEquals(0, font:getKerning('a', 'b'), 'check kerning')
test:assertEquals(1, font:getLineHeight(), 'check line height')
font:setLineHeight(2)
test:assertEquals(2, font:getLineHeight(), 'check changed line height')
font:setLineHeight(1) -- reset for drawing + wrap later
test:assertEquals(24, font:getWidth('test'), 'check data size')
test:assertEquals(true, font:hasGlyphs('test'), 'check data size')
-- check font wrapping
local width, wrappedtext = font:getWrap('LÖVE is an *awesome* framework you can use to make 2D games in Lua.', 50)
test:assertEquals(48, width, 'check actual wrap width')
test:assertEquals(8, #wrappedtext, 'check wrapped lines')
test:assertEquals('LÖVE is an ', wrappedtext[1], 'check wrapped line')
-- check drawing font
local canvas = love.graphics.newCanvas(16, 16)
love.graphics.setCanvas(canvas)
love.graphics.setFont(font)
love.graphics.print('Aa', 0, 5)
love.graphics.setCanvas()
local imgdata = love.graphics.readbackTexture(canvas, {16, 0, 0, 0, 16, 16})
test:assertPixels(imgdata, {
white = {{0,3},{4,3},{7,4},{9,4},{10,5},{0,8},{4,8},{10,8}},
}, 'font draw check')
test:exportImg(imgdata)
-- check font substitution
local fontab = love.graphics.newImageFont('resources/font-letters-ab.png', 'AB')
local fontcd = love.graphics.newImageFont('resources/font-letters-cd.png', 'CD')
fontab:setFallbacks(fontcd)
love.graphics.setCanvas(canvas)
love.graphics.clear(0, 0, 0, 0)
love.graphics.setFont(fontab)
love.graphics.print('AB', 0, 0)
love.graphics.print('CD', 0, 9)
love.graphics.setCanvas()
local imgdata2 = love.graphics.readbackTexture(canvas, {16, 0, 0, 0, 16, 16})
test:assertPixels(imgdata2, {
green = {{1,8},{6,8},{2,10},{5,10},{9,10}},
black = {{9,9},{14,8},{14,10},{14,1},{1,10}}
}, 'font draw check')
test:exportImg(imgdata2)
end
-- Image (love.graphics.newImage)
love.test.graphics.Image = function(test)
test:skipTest('test class needs writing')
-- create object
local image = love.graphics.newImage('resources/love.png', {
dpiscale = 1,
mipmaps = true
})
test:assertObject(image)
-- check texture props
test:assertEquals(love.graphics.getDPIScale(), image:getDPIScale(), 'check dpi scale')
test:assertEquals(1, image:getDepth(), 'check depth is 2d')
test:assertEquals(nil, image:getDepthSampleMode(), 'check depth sample nil')
local min, mag, ani = image:getFilter()
test:assertEquals('nearest', min, 'check filter def min')
test:assertEquals('nearest', mag, 'check filter def mag')
test:assertEquals(1, ani, 'check filter def ani')
image:setFilter('linear', 'linear', 2)
min, mag, ani = image:getFilter()
test:assertEquals('linear', min, 'check filter changed min')
test:assertEquals('linear', mag, 'check filter changed mag')
test:assertEquals(2, ani, 'check filter changed ani')
test:assertEquals(1, image:getLayerCount(), 'check 1 layer for 2d')
test:assertEquals('2d', image:getTextureType(), 'check 2d')
local horiz, vert = image:getWrap()
test:assertEquals('clamp', horiz, 'check def wrap h')
test:assertEquals('clamp', vert, 'check def wrap v')
image:setWrap('repeat', 'repeat')
horiz, vert = image:getWrap()
test:assertEquals('repeat', horiz, 'check changed wrap h')
test:assertEquals('repeat', vert, 'check changed wrap v')
test:assertEquals(true, image:isReadable(), 'check canvas readable')
test:assertEquals(1, image:getMSAA(), 'check samples match')
-- check dimensions
local cw, ch = image:getDimensions()
test:assertEquals(64, cw, 'check canvas dim w')
test:assertEquals(64, ch, 'check canvas dim h')
test:assertEquals(cw, image:getWidth(), 'check canvas w matches dim')
test:assertEquals(ch, image:getHeight(), 'check canvas h matches dim')
local pw, ph = image:getPixelDimensions()
test:assertEquals(64*love.graphics.getDPIScale(), pw, 'check pixel dim w')
test:assertEquals(64*love.graphics.getDPIScale(), ph, 'check pixel dim h')
test:assertEquals(pw, image:getPixelWidth(), 'check pixel w matches dim')
test:assertEquals(ph, image:getPixelHeight(), 'check pixel h matches dim')
-- check mipmaps
local mode, sharpness = image:getMipmapFilter()
test:assertEquals('linear', mode, 'check def minmap filter mode')
test:assertEquals(0, sharpness, 'check def minmap filter sharpness')
image:setMipmapFilter('nearest', 1)
mode, sharpness = image:getMipmapFilter()
test:assertEquals('nearest', mode, 'check changed minmap filter mode')
test:assertEquals(1, sharpness, 'check changed minmap filter sharpness')
test:assertGreaterEqual(2, image:getMipmapCount()) -- docs say no mipmaps should return 1
-- check image properties
test:assertEquals(false, image:isCompressed(), 'check not compressed')
test:assertEquals(false, image:isFormatLinear(), 'check not linear')
local cimage = love.graphics.newImage('resources/love.dxt1')
test:assertObject(cimage)
test:assertEquals(true, cimage:isCompressed(), 'check is compressed')
-- check pixel replacement
local rimage = love.image.newImageData('resources/loveinv.png')
image:replacePixels(rimage)
local canvas = love.graphics.newCanvas(64, 64)
love.graphics.setCanvas(canvas)
love.graphics.draw(image, 0, 0)
love.graphics.setCanvas()
local imgdata = love.graphics.readbackTexture(canvas, {64, 0, 0, 0, 64, 64})
local r1, g1, b1 = imgdata:getPixel(25, 25)
test:assertEquals(3, r1+g1+b1, 'check back to white')
test:exportImg(imgdata)
end
@@ -40,13 +242,102 @@ end
-- Quad (love.graphics.newQuad)
love.test.graphics.Quad = function(test)
test:skipTest('test class needs writing')
local texture = love.graphics.newImage('resources/love.png')
local quad = love.graphics.newQuad(0, 0, 32, 32, texture)
test:assertObject(quad)
-- check properties
test:assertEquals(1, quad:getLayer(), 'check default layer')
quad:setLayer(2)
test:assertEquals(2, quad:getLayer(), 'check changed layer')
local sw, sh = quad:getTextureDimensions()
test:assertEquals(64, sw, 'check texture w')
test:assertEquals(64, sh, 'check texture h')
-- check drawing and viewport changes
local canvas = love.graphics.newCanvas(64, 64)
love.graphics.setCanvas(canvas)
love.graphics.draw(texture, quad, 0, 0)
quad:setViewport(32, 32, 32, 32, 64, 64)
love.graphics.draw(texture, quad, 32, 32)
love.graphics.setCanvas()
local imgdata = love.graphics.readbackTexture(canvas, {64, 0, 0, 0, 64, 64})
test:assertPixels(imgdata, {
white = {{17,31},{31,31},{31,24},{32,32},{46,32},{32,46}},
lovepink = {{2,31},{31,2}},
loveblue = {{32,61},{61,32}}
}, 'check quad drawing')
test:exportImg(imgdata)
end
-- Shader (love.graphics.newShader)
love.test.graphics.Shader = function(test)
test:skipTest('test class needs writing')
-- check valid shader
local pixelcode1 = [[
extern Image tex2;
vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) {
vec4 texturecolor = Texel(tex2, texture_coords);
return texturecolor * color;
}
]]
local vertexcode1 = [[
vec4 position(mat4 transform_projection, vec4 vertex_position) {
return transform_projection * vertex_position;
}
]]
local shader1 = love.graphics.newShader(pixelcode1, vertexcode1)
test:assertObject(shader1)
test:assertEquals('vertex shader:\npixel shader:\n', shader1:getWarnings(), 'check shader valid')
test:assertEquals(false, shader1:hasUniform('tex1'), 'check invalid uniform')
test:assertEquals(true, shader1:hasUniform('tex2'), 'check valid uniform')
-- check invalid shader
local pixelcode2 = [[
extern float ww;
vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) {
vec4 texturecolor = Texel(tex, texture_coords);
float unused = ww * 3 * color;
return texturecolor * color;
}
]]
local res, err = pcall(love.graphics.newShader, pixelcode2, vertexcode1)
test:assertNotEquals(nil, err, 'check shader compile fails')
-- check using a shader to draw + sending uniforms
-- shader will return a given color if overwrite set to 1, otherwise def. draw
local pixelcode3 = [[
extern vec4 col;
extern float overwrite;
vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) {
vec4 texcol = Texel(tex, texture_coords);
if (overwrite == 1) {
return col;
} else {
return texcol * color;
}
}
]]
local shader3 = love.graphics.newShader(pixelcode3, vertexcode1)
local canvas = love.graphics.newCanvas(16, 16)
love.graphics.setCanvas(canvas)
-- set color to yellow
love.graphics.setColor(1, 1, 0, 1)
-- turn shader 'on' and use red to draw
shader3:send('overwrite', 1)
shader3:sendColor('col', {1, 0, 0, 1})
love.graphics.setShader(shader3)
love.graphics.rectangle('fill', 0, 0, 8, 8)
love.graphics.setShader()
-- turn shader 'off' and draw again
shader3:send('overwrite', 0)
love.graphics.setShader(shader3)
love.graphics.rectangle('fill', 8, 8, 8, 8)
love.graphics.setShader()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setCanvas()
local imgdata = love.graphics.readbackTexture(canvas, {16, 0, 0, 0, 16, 16})
test:assertPixels(imgdata, {
red = {{1,1},{1,7},{7,7},{7,1}},
yellow = {{8,8},{8,15},{15,15},{15,8}}
}, 'shader draw check')
test:exportImg(imgdata)
end
@@ -58,13 +349,40 @@ end
-- Text (love.graphics.newTextBatch)
love.test.graphics.Text = function(test)
test:skipTest('test class needs writing')
end
-- Texture (love.graphics.newTexture)
love.test.graphics.Texture = function(test)
test:skipTest('test class needs writing')
local font = love.graphics.newFont('resources/font.ttf', 8)
local plaintext = love.graphics.newTextBatch(font, 'test')
-- check text properties
test:assertObject(plaintext)
test:assertEquals(font:getHeight(), plaintext:getFont():getHeight(), 'check font matches')
local tw, th = plaintext:getDimensions()
test:assertEquals(24, tw, 'check initial dim w')
test:assertEquals(8, th, 'check initial dim h')
test:assertEquals(tw, plaintext:getWidth(), 'check initial dim w')
test:assertEquals(th, plaintext:getHeight(), 'check initial dim h')
-- check changing text
plaintext:add('more text', 100, 0, 0)
test:assertEquals(49, plaintext:getDimensions(), 'check adding text')
plaintext:set('test')
test:assertEquals(24, plaintext:getDimensions(), 'check resetting text')
plaintext:clear()
test:assertEquals(0, plaintext:getDimensions(), 'check clearing text')
-- check drawing + setting more complex text
local colortext = love.graphics.newTextBatch(font, {{1, 0, 0, 1}, 'test'})
test:assertObject(colortext)
colortext:setf('LÖVE is an *awesome* framework you can use to make 2D games in Lua', 60, 'right')
colortext:addf({{1, 1, 0}, 'overlap'}, 1000, 'left')
local font2 = love.graphics.newFont('resources/font.ttf', 8)
colortext:setFont(font2)
local canvas = love.graphics.newCanvas(64, 64)
love.graphics.setCanvas(canvas)
love.graphics.draw(colortext, 0, 10)
love.graphics.setCanvas()
local imgdata = love.graphics.readbackTexture(canvas, {16, 0, 0, 0, 16, 16})
test:assertPixels(imgdata, {
yellow = {{1,9},{8,13},{16,11},{22,10},{25,7},{29,9},{32,13},{34,15}},
white = {{17,13},{30,12},{38,9},{44,13},{58,13},{8,29},{58,29},{57,37},{5,39},{57,45},{1,55}}
}, 'text draw check')
test:exportImg(imgdata)
end
@@ -196,15 +514,8 @@ end
-- love.graphics.discard
love.test.graphics.discard = function(test)
-- from the docs: "on some desktops this may do nothing"
test:skipTest('cant test this worked')
-- wrote all this before seeing "on some desktops this may do nothing"
-- leaving in case we need it in future
--local canvas = love.graphics.newCanvas(32, 32)
--love.graphics.setCanvas(canvas)
-- love.graphics.clear(0, 0, 0, 1)
-- love.graphics.draw(Logo.texture, Logo.img, 0, 0)
-- love.graphics.discard(true, true)
--love.graphics.setCanvas()
end
@@ -369,12 +680,6 @@ love.test.graphics.polygon = function(test)
end
-- love.graphics.present
love.test.graphics.present = function(test)
test:skipTest('test class needs writing')
end
-- love.graphics.print
love.test.graphics.print = function(test)
love.graphics.setFont(Font)
@@ -939,9 +1244,7 @@ end
-- love.graphics.isGammaCorrect
love.test.graphics.isGammaCorrect = function(test)
-- we know the config so know this is false
print('gammaCorrect #1')
test:assertNotNil(love.graphics.isGammaCorrect())
print('gammaCorrect #2')
end