Commit Graph

3 Commits

Author SHA1 Message Date
John Beard 658cc8fd96 Wildcards: unify handling of all files wildcards
Use the AddFileExtListToFilter() to also generate the
wildcard for "all files". This is because:

* Users can use AddFileExtListToFilter for the all files WC
  with the same interface as for any other extensions.
* Users do not need to worry about wxGetTranslation, as the
  _() is applied in the same way as the other *Wildcard() helpers,
  and it is a function just like the others, so it is consistent
* There is a testable interface to document the expected result.
  The test is added.
2019-01-09 08:57:42 -05:00
John Beard dd313d4d47 Wildcards: use vectors instead of varargs + tests
Varargs make it very hard to pass strings in flexibly
when they (and the number of them) are not known
at compile time.

For example, this allows up to now amalgamate the "single
ext" and "multiple ext" unit tests.
2019-01-09 08:57:35 -05:00
John Beard f86d953c80 QA: unit tests for file ext filters
This adds a unit test for the recent AddFileExtListToFilter
to demonstrate how to use it and the expected output.

The unit tests are a bit clunky, as the vararg approach cannot
work winth strings passed at runtime.
2019-01-09 08:57:29 -05:00