[DRE-commits] [ruby-gd] 02/03: Add very basic test suite in debian/ruby-tests.rb

Antonio Terceiro terceiro at moszumanska.debian.org
Wed Apr 16 00:03:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository ruby-gd.

commit 09b8222535a0f873db5725d8e2f3aad450d619d0
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Tue Apr 15 20:56:38 2014 -0300

    Add very basic test suite in debian/ruby-tests.rb
---
 debian/changelog     |  1 +
 debian/control       |  2 +-
 debian/ruby-tests.rb | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index d4b511f..7b787a1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ ruby-gd (0.8.0-7) unstable; urgency=medium
 
   * Team upload.
   * Port to Ruby 2.1 (Closes: #743982)
+  * Add very basic test suite in debian/ruby-tests.rb
 
  -- Antonio Terceiro <terceiro at debian.org>  Tue, 15 Apr 2014 19:55:07 -0300
 
diff --git a/debian/control b/debian/control
index 1db3a61..39742fb 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: ruby
 Priority: optional
 Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
 Uploaders: Paul van Tilburg <paulvt at debian.org>
-Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.5.0~), libgd-dev, libpng-dev, zlib1g-dev, libfreetype6-dev, libjpeg-dev
+Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.5.0~), libgd-dev, libpng-dev, zlib1g-dev, libfreetype6-dev, libjpeg-dev, ruby-test-unit
 Standards-Version: 3.9.5
 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-gd.git
 Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-gd.git;a=summary
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
new file mode 100644
index 0000000..f2fc73d
--- /dev/null
+++ b/debian/ruby-tests.rb
@@ -0,0 +1,29 @@
+require 'GD'
+require 'test/unit'
+
+class GDTest < Test::Unit::TestCase
+
+  attr_reader :p
+
+  def setup
+    @p = GD::Polygon.new
+    p.addPt(1,1)
+    p.addPt(1,2)
+    p.addPt(2,1)
+    p.addPt(2,2)
+  end
+
+  def test_polygon_length
+    assert_equal 4, p.length
+  end
+
+  def test_polygon_bounds
+    assert_equal [1,1,2,2], p.bounds
+  end
+
+  def test_polygon_vertices
+    assert_equal [[1,1],[1,2],[2,1], [2,2]], p.vertices
+  end
+
+end
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gd.git



More information about the Pkg-ruby-extras-commits mailing list