shader-slang / slang

Making it easier to work with shaders
http://shader-slang.com
Other
3.22k stars 216 forks source link

Add unit testing to updated slang capabilities system #4086

Open ArielG-NV opened 7 months ago

ArielG-NV commented 7 months ago

All capabilities data-structures should be tested for correct functionality with test cases.

jkwak-work commented 6 months ago

The unit tests should have been written before implementing the code. I think the working process for the capability system didn't go well. The design document was skipped, the proper testing doesn't exist, and the single mega task hadn't been broken down to smaller ones.

ArielG-NV commented 6 months ago

The old implementation had 0 testing which is why there are/were bugs.

The unit tests for the new system was written before implementation to reduce this issue.

ArielG-NV commented 6 months ago

I think the biggest issue with the old system is that the debugging tools did not work.

To find an error takes 30min to a-few-hours if non-obvious

jkwak-work commented 6 months ago

This task is for writing tests for the new capability system, isn't it? Why don't we write tests as a part of the implementation? I don't see why "old" system is related to this issue.

ArielG-NV commented 6 months ago

This task is for writing tests for the new capability system, isn't it? Why don't we write tests as a part of the implementation? I don't see why "old" system is related to this issue.

single mega task hadn't been broken down to smaller ones.

This issue is more about adding unit tests & more extensive testing to the slang-test framework. There already is testing to ensure things work as intended.