shader-slang / slang

Making it easier to work with shaders
MIT License
1.78k stars 159 forks source link

Add unit testing to updated slang capabilities system #4086

Open ArielG-NV opened 1 month ago

ArielG-NV commented 1 month ago

Once #4015 is complete, all capabilities data-structures should be tested for correct functionality with test cases.

jkwak-work commented 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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.