[gobject-introspection] warningtester: Sort the list of warnings



commit e9887d2a856a963c93ddbfdf1f8d40910555b78b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Feb 3 11:13:53 2013 -0500

    warningtester: Sort the list of warnings
    
    This means that we can simply put all warnings at the bottom,
    unrelated to the order that they're emitted in the code, keeping
    line numbers more stable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693098

 tests/warn/warningtester.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/warn/warningtester.py b/tests/warn/warningtester.py
index ee6b3c1..27e0a5e 100644
--- a/tests/warn/warningtester.py
+++ b/tests/warn/warningtester.py
@@ -128,6 +128,9 @@ def check(args):
 
     expected_warnings = _extract_expected(filename)
 
+    expected_warnings.sort()
+    emitted_warnings.sort()
+
     if len(expected_warnings) != len(emitted_warnings):
         raise SystemExit('ERROR in %r: %d warnings were emitted, '
                          'expected %d:\n%s' %(os.path.basename(filename),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]