From 7ffc6b9c52bba81264e622ec0b4551963b303b23 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 1 Jan 2018 04:38:15 -0800 Subject: [PATCH] Less strict conditions for certain unit tests to account for MacOS specifics und numerics --- testdata/ruby/dbTransTest.rb | 4 ++-- testdata/ruby/qtbinding.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testdata/ruby/dbTransTest.rb b/testdata/ruby/dbTransTest.rb index c94204de8..94e9d93f7 100644 --- a/testdata/ruby/dbTransTest.rb +++ b/testdata/ruby/dbTransTest.rb @@ -170,7 +170,7 @@ class DBTrans_TestClass < TestBase assert_equal( c.is_mag?, true ) assert_equal( c.rot, RBA::DCplxTrans::M0.rot ) assert_equal( c.s_trans.to_s, "m0 2.5,-12.5" ) - assert_equal( c.angle, 45 ) + assert_equal( (c.angle - 45).abs < 1e-10, true ) assert_equal( c.ctrans( 5 ).to_s, "3.75" ) assert_equal( c.trans( RBA::DPoint::new( 12, 16 ) ).to_s, "17.3492424049,-14.6213203436" ) @@ -324,7 +324,7 @@ class DBTrans_TestClass < TestBase assert_equal( c.is_mag?, true ) assert_equal( c.rot, RBA::CplxTrans::M0.rot ) assert_equal( c.s_trans.to_s, "m0 3,-13" ) - assert_equal( c.angle, 45 ) + assert_equal( (c.angle - 45).abs < 1e-10, true ) assert_equal( c.ctrans( 5 ).to_s, "3.75" ) assert_equal( c.trans( RBA::Point::new( 12, 16 ) ).to_s, "17.3492424049,-14.6213203436" ) diff --git a/testdata/ruby/qtbinding.rb b/testdata/ruby/qtbinding.rb index c74c396ad..cce2909bb 100644 --- a/testdata/ruby/qtbinding.rb +++ b/testdata/ruby/qtbinding.rb @@ -576,8 +576,8 @@ class QtBinding_TestClass < TestBase assert_equal(child.height() > 100, true) parent.resize(100, 100) - assert_equal(child.width() < 100, true) - assert_equal(child.height() < 100, true) + assert_equal(child.width() <= 100, true) + assert_equal(child.height() <= 100, true) # now if we delete the parent, the child needs to become disconnected