Silk.NET
Silk.NET copied to clipboard
Use ClangSharp's autogenerated bindings tests (i.e. for blittability, size, etc)
This is something that is left out of the initial pass of the SilkTouch Scraper because I (knowingly and idiotically) did not add support for tests in single-file XML dumps upstream in ClangSharp.
The work is:
- [ ] Investigate adding support upstream in ClangSharp for outputting test code where the XML output mode is used with a single file
- Currently, ClangSharp's
OutputBuilderFactoryis hardcoded to create aCSharpOutputBuilder. options are:- add to the XML the test "goals" i.e.
<bindings><test type="DXGI_OUTPUT_DESC" isSize32="32" isSize64="64" /></bindings>This is personally my preferred option - return a
CSharpOutputBuilderthat has C# code for stuff likeCreateTestswithin the XML, so it outputs something like<bindings><tests name="DXGI_OUTPUT_DESCTests"><code></code></tests></bindings>. This would work nicely, but there may not be enough XML markers to allow us to change the name of the class under test, for example (which is something the Scraper definitely would need)
- add to the XML the test "goals" i.e.
- Currently, ClangSharp's
- [ ] Recognise the new XML elements in the SilkTouch Scraper
- [ ] Add required configuration structures, so that this functionality can be configured for each project
- [ ] Output into the test project (the path of which indicated by the configuration structure) all the test code.
cc @tannergooding
Also yes I am opening issues regarding code that isn't even written yet.