Adding unit test cases for PShapeOBJ addMaterials() and rgbaValue() by kishore4242 · Pull Request #1486 · processing/processing4
Summary
Adds 5 comprehensive unit tests for PShapeOBJ class to improve test coverage
for material management and color conversion functionality.
Tests Added
- testRgbaValueWhiteColor: Tests color to RGBA conversion
- testAddMaterials: Tests single material addition
- testAddMaterialsMultiple: Tests multiple materials with name verification
- testAddMaterialWithNullValue: Tests edge case with null names
- testAddMaterialDuplicateNameOverwritesHash: Tests duplicate name behavior
All tests pass locally: ./gradlew test