changeset 3127:8cd783e45037

Updated #271: Added string type to init test
author unexist
date Tue, 15 Nov 2011 21:40:51 +0100
parents 74578423ead6
children f78d6ad0fb0f
files test/contexts/geometry.rb
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/test/contexts/geometry.rb	Tue Nov 15 21:40:10 2011 +0100
+++ b/test/contexts/geometry.rb	Tue Nov 15 21:40:51 2011 +0100
@@ -11,15 +11,16 @@
 
 context 'Geometry' do
   setup do # {{{
-    Subtlext::Geometry.new 0, 0, 1, 1
+    Subtlext::Geometry.new(0, 0, 1, 1)
   end # }}}
 
   asserts 'Init types' do # {{{
-    g1 = Subtlext::Geometry.new topic
-    g2 = Subtlext::Geometry.new [ 0, 0, 1, 1 ]
+    g1 = Subtlext::Geometry.new(topic)
+    g2 = Subtlext::Geometry.new([ 0, 0, 1, 1 ])
     g3 = Subtlext::Geometry.new({ x: 0, y: 0, width: 1, height: 1 })
+    g4 = Subtlext::Geometry.new("0x0+1+1")
 
-    topic == g1 and g1 == g2 and g1 == g3
+    topic == g1 and g1 == g2 and g1 == g3 and g1 == g4
   end # }}}
 
   asserts 'Check attributes' do # {{{
@@ -34,7 +35,7 @@
   end # }}}
 
   asserts 'Equal and compare' do # {{{
-    topic.eql? Subtlext::Geometry.new(0, 0, 1, 1) and topic == topic
+    topic.eql?(Subtlext::Geometry.new(0, 0, 1, 1)) and topic == topic
   end # }}}
 
   asserts 'Convert to string' do # {{{