[SCM] ci-tooling packaging branch, master, updated. b7c8e411ae6be6c305dec187825cf6b88e3a0934

Harald Sitter apachelogger-guest at moszumanska.debian.org
Mon Oct 12 09:09:05 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=ed824bd

The following commit has been merged in the master branch:
commit ed824bd3fd20278790d2779260295c74ebb7eed9
Author: Harald Sitter <sitter at kde.org>
Date:   Mon Oct 12 10:46:09 2015 +0200

    let lint results match ==
---
 lib/lint/result.rb       |  7 +++++++
 test/test_lint_result.rb | 17 +++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/lib/lint/result.rb b/lib/lint/result.rb
index e504c78..002f239 100644
--- a/lib/lint/result.rb
+++ b/lib/lint/result.rb
@@ -23,6 +23,13 @@ module Lint
     def all
       @errors + @warnings + @informations
     end
+
+    def ==(other)
+      @valid == other.valid &&
+        @errors == other.errors &&
+        @warnings == other.warnings &&
+        @informations == other.informations
+    end
   end
 
   # Logs arary of results to stdout
diff --git a/test/test_lint_result.rb b/test/test_lint_result.rb
index fe521b2..586211e 100644
--- a/test/test_lint_result.rb
+++ b/test/test_lint_result.rb
@@ -53,4 +53,21 @@ class LintResultTest < TestCase
     r.informations << 'info1' << 'info2'
     assert_equal(%w(error1 error2 warning1 info1 info2), r.all)
   end
+
+  def test_equalequal
+    r1 = Lint::Result.new
+    r1.valid = true
+    r1.errors << 'error1' << 'error2'
+    r1.warnings << 'warning1'
+    r1.informations << 'info1' << 'info2'
+
+    r2 = Lint::Result.new
+    r2.valid = true
+    r2.errors << 'error1' << 'error2'
+    r2.warnings << 'warning1'
+    r2.informations << 'info1' << 'info2'
+
+    assert(r1 == r2, 'r1 not same as r2')
+    assert(r2 == r1, 'r2 not same as r1')
+  end
 end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list