[gtk-doc] scan: use a header var in the macro tests
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] scan: use a header var in the macro tests
- Date: Sat, 2 Feb 2019 20:33:25 +0000 (UTC)
commit 9515624c961b054e79e3352477be329fbcf140cf
Author: Stefan Sauer <ensonic users sf net>
Date: Sat Feb 2 21:13:26 2019 +0100
scan: use a header var in the macro tests
This is how we do this in the other tests too.
tests/scan.py | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/tests/scan.py b/tests/scan.py
index 80fa2b4..787b418 100755
--- a/tests/scan.py
+++ b/tests/scan.py
@@ -365,22 +365,19 @@ class ScanHeaderContentMacros(ScanHeaderContentTestCase):
self.assertEqual([], self.types)
def test_FindsMacroNumber(self):
- slist, doc_comments = self.scanHeaderContent([
- '#define FOO 1'
- ])
- self.assertDecl('FOO', '#define FOO 1', slist)
+ header = '#define FOO 1'
+ slist, doc_comments = self.scanHeaderContent([header])
+ self.assertDecl('FOO', header, slist)
def test_FindsMacroExpression(self):
- slist, doc_comments = self.scanHeaderContent([
- '#define FOO (1 << 1)'
- ])
- self.assertDecl('FOO', '#define FOO (1 << 1)', slist)
+ header = '#define FOO (1 << 1)'
+ slist, doc_comments = self.scanHeaderContent([header])
+ self.assertDecl('FOO', header, slist)
def test_FindsMacroFunction(self):
- slist, doc_comments = self.scanHeaderContent([
- '#define FOO(x) (x << 1)'
- ])
- self.assertDecl('FOO', '#define FOO(x) (x << 1)', slist)
+ header = '#define FOO(x) (x << 1)'
+ slist, doc_comments = self.scanHeaderContent([header])
+ self.assertDecl('FOO', header, slist)
def test_IgnoresInternalMacro(self):
slist, doc_comments = self.scanHeaderContent([
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]