[gtk-doc] scan: use a header var in the macro tests



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]