[glib: 3/4] tests: Add glib-mkenums test for missing nicks
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 3/4] tests: Add glib-mkenums test for missing nicks
- Date: Mon, 25 Jun 2018 13:12:07 +0000 (UTC)
commit 76083b6530fd48adc2ef3664b7d9b326a3479fc4
Author: Philip Withnall <withnall endlessm com>
Date: Wed May 2 13:25:11 2018 +0100
tests: Add glib-mkenums test for missing nicks
This adds a test to verify the change from issue #1360.
Signed-off-by: Philip Withnall <withnall endlessm com>
https://gitlab.gnome.org/GNOME/glib/issues/1360
gobject/tests/mkenums.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/gobject/tests/mkenums.py b/gobject/tests/mkenums.py
index a8820ae53..431453d01 100644
--- a/gobject/tests/mkenums.py
+++ b/gobject/tests/mkenums.py
@@ -359,6 +359,20 @@ comment: {standard_bottom_comment}
# The output should be the same.
self.assertEqual(out1, out2)
+ def test_no_nick(self):
+ """Test trigraphs with a desc but no nick. Issue #1360."""
+ h_contents = '''
+ typedef enum {
+ GEGL_SAMPLER_NEAREST = 0, /*< desc="nearest" >*/
+ } GeglSamplerType;
+ '''
+ (info, out, err, subs) = self.runMkenumsWithHeader(h_contents)
+ self.assertEqual('', err)
+ self.assertSingleEnum(out, subs, 'GeglSamplerType',
+ 'gegl_sampler_type', 'GEGL_SAMPLER_TYPE',
+ 'SAMPLER_TYPE', 'GEGL', 'enum', 'Enum',
+ 'ENUM', 'GEGL_SAMPLER_NEAREST', 'nearest', '0')
+
if __name__ == '__main__':
unittest.main(testRunner=taptestrunner.TAPTestRunner())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]