summaryrefslogtreecommitdiff
path: root/tests/test-layout.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "testsuite: Don't use g_test_skip"Simon McVittie2021-01-031-3/+0
| | | | | | | | | | | When versions of Meson with bug https://github.com/mesonbuild/meson/issues/7515 are no longer widespread, the Pango test suite should diagnose which tests are skipped again. Versions 0.55.0 to 0.55.2 inclusive have the bug; version 0.55.3 is OK. This reverts commit 440f9c2609b7f5f9d8f65619b029a5eb660de88b. Signed-off-by: Simon McVittie <smcv@debian.org>
* Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2020-09-171-3/+5
|\ | | | | | | | | misc fixes See merge request GNOME/pango!242
| * Make test-layout work for generating data againMatthias Clasen2020-09-171-3/+8
| | | | | | | | This was broken in f6032b754fd76ebbf0ae6.
* | tests: Fix memory leaksMatthias Clasen2020-09-121-1/+1
| | | | | | | | These were showing up as errors from lsan.
* | tests: Make test-layout work standaloneMatthias Clasen2020-09-121-0/+3
|/ | | | This broke when I recently reshuffled things.
* testsuite: Don't use g_test_skipMatthias Clasen2020-07-301-0/+3
| | | | | | | meson 0.55 considers tests using it to be FAIL. I disagree, but lets quietly skip until 0.55.1 is available.
* tests: Update the locale useEmmanuele Bassi2020-06-081-3/+4
| | | | | Create the PangoContext for the test after resetting the locale, and use the en_US.utf8 name, as it seems to be the name used by Fedora.
* tests: Ensure we respect the TAP output formatEmmanuele Bassi2020-06-081-3/+11
| | | | | When dumping the diff between the computed and expected results, we need to respect the TAP format and place "#" in front of each line.
* Skip layout tests if the en_US locale is not availableEmmanuele Bassi2020-06-081-3/+12
| | | | | There's no point in running a tests if we know the locale isn't there. The reason gets logged, so the developer can decide to install it.
* tests: Use the appropriate GTest APIEmmanuele Bassi2020-04-141-8/+5
| | | | | | | | Do not use homegrown assertion and failure macros, when GTest has perfectly functional API to deal with all the cases Pango covers. Using GTest also allows us to rely on appropriate formatting for results and logging.
* test-layout: Be robust against odd runsMatthias Clasen2019-07-141-16/+4
| | | | | This causes some changes in the output. Update expected output.
* Some test updatesMatthias Clasen2019-07-141-4/+4
| | | | | Share the attribute printing code between all the tests, update expected output to match.
* layout test: Use a better localeMatthias Clasen2019-06-031-1/+2
| | | | | We need to use a Unicode locale in order to test Emoji and similar glyphs.
* Revert "Replace PangoScript by GUnicodeScript"Michael Catanzaro2019-05-271-1/+1
| | | This reverts commit 3e754defc364a89b2136894399b3463976840156
* Replace PangoScript by GUnicodeScriptMatthias Clasen2019-05-251-1/+1
| | | | | | | | | This commit replaces the PangoScript enum by a typedef to GUnicodeScript, and preserves the old enum values as defines. This depends on adding an enum type for GUnicodeScript in gobject.
* Restore scaling of CoreText fonts.John Ralls2018-05-081-10/+1
| | | | Fixes bug 787867.
* CoreText: Remove absolute size and scaling to screen resolution.John Ralls2017-08-151-1/+10
| | | | | | | | | | | | | Cairo's CGFont backend already handles scaling fonts to the display resolution, so scaling to the screen screen resolution in Pango's CoreText backend generates double-sized text on a Retina display. The layout test depended on providing a (bogus) resolution of 96DPI and scaling the font to it in order to obtain the "expected" layout results. This is replaced by adjusting the font size in test-layout.c if Pango is compiled for CoreText. https://bugzilla.gnome.org/show_bug.cgi?id=782393
* tests: Don't include unistd.h unconditionallyChun-wei Fan2017-08-081-1/+4
| | | | | | | Don't include unistd.h on Windows, and include io.h if necessary, as Windows compilers may not ship with it. https://bugzilla.gnome.org/show_bug.cgi?id=783274
* Silence a few coverity warningsMatthias Clasen2015-07-171-1/+3
| | | | | | | coverity says: Using uninitialized value "index2". It didn't notice that the only time we can reach the index = index2 assignment with index2 still uninitialized is when we are never going to look at index again.
* Split out some test functionsMatthias Clasen2015-03-131-169/+7
| | | | These will be reused later.
* Don't compare fonts in the layout testMatthias Clasen2014-09-191-1/+1
| | | | | For some reason (that I haven't been able to track down), this fails in the installed tests on build.gnome.org.
* Try to fix the test on build.gnome.orgMatthias Clasen2014-09-061-4/+6
| | | | | | For some reason, the test-layout test does not show the font size when run on build.gnome.org. Try harder to make it use the Cantarell 11 font that I want it to use.
* test-layout: Better error reportingMatthias Clasen2014-09-031-8/+62
| | | | | Run diff over the output to give a meaningful error if the comparison fails.
* Add tests for PangoLayoutMatthias Clasen2014-08-301-0/+487
This tests works similar to the markup parser tests - we populate a layout with known data, and then compare a dump of its properties with expected output.