While working on the previous commit, I noticed Gtk.Scale specially
handles translator comments, but more importantly, that it does not put
non-translatable labels in its decompiled output.
This is wrong, as it's not unlikely that Gtk.Scale marks would use a
purely numeric string, which should not be lost upon decompilation.
Add a test for this case too.
Blueprint allows both `//` and `/*...*/` style comments, but if a
project prefers only `/*...*/` comments, it is currently not possible to
have these inline.
Therefore, treat these comments equal if they occur inline. To make this
easier to understand, we refactor the comment handling slightly to first
handle single-line comment whitespace, and then handle newlines for both
single-line and multi-line style comments.
Adjust the test accordingly to make sure this works.
A lookup tag with no type attribute would crash the decompiler, even if
that was valid. This wasn't caught by the tests since blueprint never
generates such XML.
Also fixed a bug in the tests that caused decompiler-only tests not to
run.
- Added tests for more error messages
- Test the "go to reference" feature at every character index of every
test case
- Delete unused code and imports
- Fix some bugs I found along the way
Libraries can add new deprecations, or the environment you're running
the tests in might have old libraries where the things we test aren't
deprecated yet. Move the deprecations test into its own module with its
own code, so it can check library versions and skip the test if it won't
work.
Ignore deprecation warnings in the error handling tests, except in the
test specifically for deprecations. This prevents them from breaking if
libraries introduce new deprecations.
Fixes#178.
Add more tags to the list of things the decompiler can handle. This
required some changes to track the containing object class in the
DecompileCtx, since some objects use the same tag names.
The improved support means we can test the decompiler on most of the
test suite. Any new test samples will by default be tested to ensure the
decompiler produces the original blueprint file.
Also, updated the decompiler to always use double quotes.
Allow BuilderListItemFactory to contain Gtk.ColumnViewRow or
Gtk.ColumnViewCell templates, in addition to Gtk.ListItem templates.
This is necessary for people to use Gtk.ColumnView idiomatically in
Blueprint.
Fixes#157.