added miterlimit test
authorMatthias Kramm <kramm@quiss.org>
Sun, 16 Aug 2009 14:18:13 +0000 (16:18 +0200)
committerMatthias Kramm <kramm@quiss.org>
Sun, 16 Aug 2009 14:18:13 +0000 (16:18 +0200)
spec/edit_spec.py
spec/miterlimit.pdf [new file with mode: 0644]
spec/miterlimit.spec.rb [new file with mode: 0644]

index b270d18..670e1bf 100755 (executable)
@@ -293,7 +293,7 @@ class ImageWindow(wx.Window):
             if check:
                 self.model.delete(check)
             else:
-                p = slef.model.GetPixel(x,y)
+                p = self.model.getPixel(x,y)
                 color = p[0]<<16|p[1]<<8|p[2]
                 self.model.append(PixelColorCheck(x,y,color))
         else:
diff --git a/spec/miterlimit.pdf b/spec/miterlimit.pdf
new file mode 100644 (file)
index 0000000..54743ac
Binary files /dev/null and b/spec/miterlimit.pdf differ
diff --git a/spec/miterlimit.spec.rb b/spec/miterlimit.spec.rb
new file mode 100644 (file)
index 0000000..6241ab9
--- /dev/null
@@ -0,0 +1,21 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe "pdf conversion" do
+    convert_file "miterlimit.pdf" do
+        pixel_at(451,153).should_be_of_color 0x999999
+        pixel_at(492,154).should_be_of_color 0x666666
+        pixel_at(523,153).should_be_of_color 0x666666
+        pixel_at(386,151).should_be_of_color 0x666666
+        pixel_at(86,65).should_be_of_color 0x666666
+        pixel_at(80,77).should_be_of_color 0x999999
+        pixel_at(77,86).should_be_of_color 0x666666
+        pixel_at(474,380).should_be_of_color 0xffffff
+        pixel_at(492,380).should_be_of_color 0xffffff
+        pixel_at(452,381).should_be_of_color 0x999999
+        pixel_at(450,369).should_be_of_color 0x666666
+        pixel_at(376,382).should_be_of_color 0x666666
+        pixel_at(89,319).should_be_of_color 0x666666
+        pixel_at(119,314).should_be_of_color 0x999999
+        pixel_at(142,305).should_be_of_color 0x666666
+    end
+end