From 72c716f38d6b614de4a35f7af2c1f43326ed1264 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 18 May 2025 17:04:21 +0200 Subject: [PATCH] More robust tests. --- testdata/ruby/pexTests.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/testdata/ruby/pexTests.rb b/testdata/ruby/pexTests.rb index e5e98a878..2e11f42de 100644 --- a/testdata/ruby/pexTests.rb +++ b/testdata/ruby/pexTests.rb @@ -242,12 +242,15 @@ class PEX_TestClass < TestBase network = rex.extract(tech, geo, vertex_ports, polygon_ports) - assert_equal(network.to_s(true) + "\n", <<"END") -R $2.1(9.3,-5.9;9.9,-5.3) P0.1(12.9,-5.9;13.5,-5.3) 2.25 -R $8.2(10,-3.5;10,-2.7) P0.2(12.9,-3.4;13.5,-2.8) 1 -R $2.1(9.3,-5.9;9.9,-5.3) V0.2(0.3,-5.7;0.5,-5.5) 55.75 -R $2.1(9.3,-5.9;9.9,-5.3) $8.2(10,-3.5;10,-2.7) 13.2813 -R $8.2(10,-3.5;10,-2.7) V0.1(5.2,0.4;5.2,0.4) 28.7812 + n = network.to_s(true) + n = n.gsub(/ \$\d+\./, " $x.") + n = n.split("\n").sort.join("\n") + "\n" + assert_equal(n, <<"END") +R $x.1(9.3,-5.9;9.9,-5.3) $x.2(10,-3.5;10,-2.7) 13.2813 +R $x.1(9.3,-5.9;9.9,-5.3) P0.1(12.9,-5.9;13.5,-5.3) 2.25 +R $x.1(9.3,-5.9;9.9,-5.3) V0.2(0.3,-5.7;0.5,-5.5) 55.75 +R $x.2(10,-3.5;10,-2.7) P0.2(12.9,-3.4;13.5,-2.8) 1 +R $x.2(10,-3.5;10,-2.7) V0.1(5.2,0.4;5.2,0.4) 28.7812 R V0.1(5.2,0.4;5.2,0.4) V0.2(0.3,-5.7;0.5,-5.5) 17.375 END