Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.1

Bug #17101 Unit tests fail (64 bit systems)
Submitted: 2010-02-14 07:56 UTC
From: doconnor Assigned: izi
Status: Closed Package: Services_GeoNames (version CVS)
PHP Version: 5.3.1 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 37 - 16 = ?

 
 [2010-02-14 07:56 UTC] doconnor (Daniel O'Connor)
Description: ------------ See http://test.pear.php.net/unit-test-results/phpunit_results.txt Actual result: -------------- 9) /home/clockwerx/packages-all/Services_GeoNames/tests/test_findnearbywikipedia.phpt --- Expected +++ Actual @@ @@ [countryCode] => CH - [lng] => 8.99861111111 + [lng] => 8.9986111111111 [feature] => mountain [lang] => en - [lat] => 46.9986111111 + [lat] => 46.998611111111 @@ @@ [countryCode] => CH - [lng] => 9.01333333333 + [lng] => 9.0133333333333 [feature] => waterbody [lang] => en - [lat] => 46.9808333333 + [lat] => 46.980833333333 @@ @@ [countryCode] => CH - [lng] => 8.98055555556 + [lng] => 8.9805555555556 [feature] => waterbody [thumbnailImg] => http://www.geonames.org/img/wikipedia/2000/thumb-1904-100.jpg [lang] => en - [lat] => 47.0255555556 + [lat] => 47.025555555556 @@ @@ [countryCode] => CH - [lng] => 9.06666666667 + [lng] => 9.0666666666667 [feature] => adm1st [lang] => en - [lat] => 46.9833333333 + [lat] => 46.983333333333 @@ @@ [countryCode] => CH - [lng] => 9.01388888889 + [lng] => 9.0138888888889 [feature] => waterbody [lang] => en - [lat] => 47.0869444444 + [lat] => 47.086944444444 [population] => 0 ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 FAILURES! Tests: 37, Assertions: 0, Failures: 9.

Comments

 [2010-04-10 18:04 UTC] izi (David Jean Louis)
-Status: Open +Status: Closed -Assigned To: +Assigned To: izi
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/
 [2010-04-11 04:39 UTC] doconnor (Daniel O'Connor)
 [2010-04-12 14:38 UTC] izi (David Jean Louis)
Hey Daniel, tests should run fine now !
 [2010-04-25 19:51 UTC] doconnor (Daniel O'Connor)
-Status: Closed +Status: Open
:( I think we're on the right track; but still there's a few @ http://test.pear.php.net/unit-test-results/phpunit_results.txt php -c ../php.ini -f /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php PHPUnit 3.4.10 by Sebastian Bergmann. ...F.........FF..F....F..F......F.FF. Time: 7 seconds, Memory: 11.25Mb There were 9 failures: 1) /home/clockwerx/packages-all/Services_GeoNames/tests/test_hierarchy.phpt --- Expected +++ Actual @@ @@ [geonameId] => 6255148 - [lat] => 48.6909603909 + [lat] => 48.690960390925 @@ @@ [countryCode] => CH - [lng] => 8.01426887512 + [lng] => 8.0142688751221 @@ @@ [geonameId] => 2658434 - [lat] => 47.0001583753 + [lat] => 47.000158375286 [population] => 7581000 [adminName1] => ) [3] => stdClass Object ( [countryName] => Switzerland [adminCode1] => ZH [fclName] => country, state, region,... [countryCode] => CH [lng] => 8.6666667 [adminName2] => [adminName3] => [fcodeName] => first-order administrative division [adminName4] => [timezone] => stdClass Object ( [dstOffset] => 2 [gmtOffset] => 1 [timeZoneId] => Europe/Zurich ) [fcl] => A [name] => Kanton Zürich [fcode] => ADM1 [geonameId] => 2657895 [lat] => 47.4166667 [population] => 1289559 [adminName1] => Zürich ) [4] => stdClass Object ( [alternateNames] => Array ( [0] => stdClass Object ( [name] => Lungsod ng Zürich [lang] => tl ) [1] => stdClass Object ( [name] => 苏黎世 [lang] => zh ) [2] => stdClass Object ( [name] => زيورخ [lang] => ar ) [3] => stdClass Object ( [name] => Canton Zurìcu [lang] => scn ) [4] => stdClass Object ( [name] => Zürich [lang] => sv ) [5] => stdClass Object ( [name] => Zurique [lang] => pt ) [6] => stdClass Object ( [name] => Zürich [lang] => af ) [7] => stdClass Object ( [name] => Цирих [lang] => sr ) [8] => stdClass Object ( [name] => Zürich [lang] => sq ) [9] => stdClass Object ( [name] => Zürich [lang] => de ) [10] => stdClass Object ( [name] => Zürich [lang] => als ) [11] => stdClass Object ( [name] => Zurych [lang] => pl ) [12] => stdClass Object ( [name] => Zürich [lang] => sl ) [13] => stdClass Object ( [name] => Zürich [lang] => da ) [14] => stdClass Object ( [name] => Zürich [lang] => sk ) [15] => stdClass Object ( [name] => Zurich [lang] => pdc ) [16] => stdClass Object ( [name] => Zürich [lang] => sh ) [17] => stdClass Object ( [name] => Zürich [lang] => vi ) [18] => stdClass Object ( [name] => チューリッヒ [lang] => ja ) [19] => stdClass Object ( [name] => Curych [lang] => cs ) [20] => stdClass Object ( [name] => Zurigo [lang] => it ) [21] => stdClass Object ( [name] => Zurich [lang] => fr ) [22] => stdClass Object ( [name] => Cīrihe [lang] => lv ) [23] => stdClass Object ( [name] => Zürich [lang] => is ) [24] => stdClass Object ( [name] => ܨܝܘܪܫ [lang] => arc ) [25] => stdClass Object ( [name] => Ciūrichas [lang] => lt ) [26] => stdClass Object ( [name] => Zürich [lang] => io ) [27] => stdClass Object ( [name] => Цюрих [lang] => ru ) [28] => stdClass Object ( [name] => Zürich [lang] => fi ) [29] => stdClass Object ( [name] => Zürich [lang] => ro ) [30] => stdClass Object ( [name] => Turitg [lang] => rm ) [31] => stdClass Object ( [name] => Zuric [lang] => ca ) [32] => stdClass Object ( [name] => Zürich [lang] => id ) [33] => stdClass Object ( [name] => Turicum [lang] => la ) [34] => stdClass Object ( [name] => سيۇرىخ [lang] => ug ) [35] => stdClass Object ( [name] => Zürich [lang] => bs ) [36] => stdClass Object ( [name] => Zurich [lang] => eu ) [37] => stdClass Object ( [name] => Tsurique [lang] => frp ) [38] => stdClass Object ( [name] => Zürich [lang] => et ) [39] => stdClass Object ( [name] => Zürich [lang] => hu ) [40] => stdClass Object ( [name] => Zúrich [lang] => es ) [41] => stdClass Object ( [name] => Zürich [lang] => hr ) [42] => stdClass Object ( [name] => Zuriko [lang] => eo ) [43] => stdClass Object ( [name] => Zürich [lang] => en ) [44] => stdClass Object ( [name] => Zürich [lang] => qu ) [45] => stdClass Object ( [name] => Ζυρίχη [lang] => el ) [46] => stdClass Object ( [name] => 취리히 [lang] => ko ) [47] => stdClass Object ( [name] => Цюрих [lang] => bg ) [48] => stdClass Object ( [name] => Zürich [lang] => no ) [49] => stdClass Object ( [name] => Zürih [lang] => tr ) [50] => stdClass Object ( [name] => Zürich [lang] => nn ) [51] => stdClass Object ( [name] => Цюрых [lang] => be ) [52] => stdClass Object ( [name] => ज़्यूरिख [lang] => hi ) [53] => stdClass Object ( [name] => Zürich [lang] => nl ) [54] => stdClass Object ( [name] => ציריך [lang] => he ) ) [countryName] => Switzerland [adminCode1] => ZH [fclName] => city, village,... [countryCode] => CH [lng] => 8.55 [adminName2] => [adminName3] => [fcodeName] => seat of a first-order administrative division [adminName4] => [timezone] => stdClass Object ( [dstOffset] => 2 [gmtOffset] => 1 [timeZoneId] => Europe/Zurich ) [fcl] => P [name] => Zürich [fcode] => PPLA [geonameId] => 2657896 [lat] => 47.3666667 [population] => 341730 [adminName1] => Zürich ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 2) /home/clockwerx/packages-all/Services_GeoNames/tests/test_wikipediasearch.phpt --- Expected +++ Actual @@ @@ [countryCode] => FR - [lng] => 1.44277777778 + [lng] => 1.4427777777778 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/98000/thumb-97064-100.jpg [lang] => en - [lat] => 43.6052777778 + [lat] => 43.605277777778 [population] => 0 ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 3) /home/clockwerx/packages-all/Services_GeoNames/tests/test_siblings.phpt --- Expected +++ Actual @@ @@ [countryCode] => GB - [lng] => -4.14974212646 + [lng] => -4.1497421264648 [fcodeName] => territory [fcl] => A [name] => Gower [fcode] => TERR [geonameId] => 6697760 - [lat] => 51.5952016746 + [lat] => 51.595201674619 @@ @@ [countryCode] => VA - [lng] => 12.4533033371 + [lng] => 12.453303337097 [fcodeName] => independent political entity [fcl] => A [name] => Holy See [fcode] => PCLI [geonameId] => 3164670 - [lat] => 41.9022450997 + [lat] => 41.902245099709 @@ @@ [countryCode] => GR - [lng] => 23.2127380371 + [lng] => 23.212738037109 [fcode] => TERR [geonameId] => 6692223 - [lat] => 39.3024245604 + [lat] => 39.302424560415 @@ @@ [countryCode] => RS - [lng] => 20.4599761963 + [lng] => 20.459976196289 [fcodeName] => independent political entity [fcl] => A [name] => Serbia [fcode] => PCLI [geonameId] => 6290252 - [lat] => 44.8189246907 + [lat] => 44.818924690689 @@ @@ [countryCode] => CH - [lng] => 8.01426887512 + [lng] => 8.0142688751221 [fcodeName] => independent political entity [fcl] => A [name] => Switzerland [fcode] => PCLI [geonameId] => 2658434 - [lat] => 47.0001583753 + [lat] => 47.000158375286 [population] => 7581000 [adminName1] => ) [47] => stdClass Object ( [countryName] => Ukraine [adminCode1] => 00 [fclName] => country, state, region,... [countryCode] => UA [lng] => 32 [fcodeName] => independent political entity [fcl] => A [name] => Ukraine [fcode] => PCLI [geonameId] => 690791 [lat] => 49 [population] => 47425336 [adminName1] => ) [48] => stdClass Object ( [countryName] => United Kingdom [adminCode1] => 00 [fclName] => country, state, region,... [countryCode] => GB [lng] => -4 [fcodeName] => independent political entity [fcl] => A [name] => United Kingdom [fcode] => PCLI [geonameId] => 2635167 [lat] => 54 [population] => 60943000 [adminName1] => ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 4) /home/clockwerx/packages-all/Services_GeoNames/tests/test_search.phpt --- Expected +++ Actual @@ @@ [geonameId] => 2643743 - [lat] => 51.5084152564 + [lat] => 51.508415256393 [population] => 7421209 [adminName1] => Angleterre ) [1] => stdClass Object ( [countryName] => Canada [adminCode1] => 08 [fclName] => city, village,... [countryCode] => CA [lng] => -81.233042387 [fcodeName] => populated place [fcl] => P [name] => London [fcode] => PPL [geonameId] => 6058560 [lat] => 42.983389283 [population] => 352395 [adminName1] => Ontario ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 5) /home/clockwerx/packages-all/Services_GeoNames/tests/test_countryinfo.phpt --- Expected +++ Actual @@ @@ Array ( [0] => stdClass Object ( [countryName] => Germania - [bBoxWest] => 5.86563825607 + [bBoxWest] => 5.865638256073 @@ @@ [languages] => de - [bBoxEast] => 15.0398902893 + [bBoxEast] => 15.039890289307 [isoAlpha3] => DEU [continent] => EU - [bBoxNorth] => 55.0556411743 + [bBoxNorth] => 55.055641174316 [geonameId] => 2921044 - [bBoxSouth] => 47.2757720947 + [bBoxSouth] => 47.275772094727 [population] => 82369000 ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 6) /home/clockwerx/packages-all/Services_GeoNames/tests/test_postalcodelookup.phpt --- Expected +++ Actual @@ @@ [countryCode] => FR - [lng] => 1.09583333261 + [lng] => 1.0958333326087 [placeName] => Toulouse - [lat] => 43.2637681174 + [lat] => 43.263768117391 [adminName1] => Midi-Pyrenees ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 7) /home/clockwerx/packages-all/Services_GeoNames/tests/test_wikipediaboundingbox.phpt --- Expected +++ Actual @@ @@ [countryCode] => CN - [lng] => 106.506944444 + [lng] => 106.50694444444 @@ @@ [countryCode] => IN - [lng] => 72.8258333333 + [lng] => 72.825833333333 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/36000/thumb-35101-100.jpg [lang] => en - [lat] => 18.9647222222 + [lat] => 18.964722222222 @@ @@ [countryCode] => CN - [lng] => 121.466666667 + [lng] => 121.46666666667 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/29000/thumb-28777-100.jpg [lang] => en - [lat] => 31.2333333333 + [lat] => 31.233333333333 @@ @@ [countryCode] => MX - [lng] => -99.1455555556 + [lng] => -99.145555555556 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/100000/thumb-99165-100.jpg [lang] => en - [lat] => 19.4194444444 + [lat] => 19.419444444444 @@ @@ [countryCode] => US - [lng] => -74.0058333333 + [lng] => -74.005833333333 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/156000/thumb-155265-100.jpg [lang] => en - [lat] => 40.7127777778 + [lat] => 40.712777777778 @@ @@ [lang] => en - [lat] => 32.8271027778 + [lat] => 32.827102777778 @@ @@ [countryCode] => US - [lng] => -78.5041666667 + [lng] => -78.504166666667 [feature] => landmark [thumbnailImg] => http://www.geonames.org/img/wikipedia/147000/thumb-146909-100.jpg [lang] => en - [lat] => 38.0345833333 + [lat] => 38.034583333333 @@ @@ [countryCode] => IN - [lng] => 78.3105555556 + [lng] => 78.310555555556 [feature] => country [thumbnailImg] => http://www.geonames.org/img/wikipedia/130000/thumb-129295-100.jpg [lang] => en - [lat] => 21.1255555556 + [lat] => 21.125555555556 @@ @@ [countryCode] => CN - [lng] => 103.083333333 + [lng] => 103.08333333333 @@ @@ [countryCode] => PK - [lng] => 67.0180555556 + [lng] => 67.018055555556 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/131000/thumb-130298-100.jpg [lang] => en - [lat] => 24.8508333333 + [lat] => 24.850833333333 @@ @@ [countryCode] => CN - [lng] => 114.166666667 + [lng] => 114.16666666667 @@ @@ [countryCode] => CN - [lng] => 117.183333333 + [lng] => 117.18333333333 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/98000/thumb-97687-100.jpg [lang] => en - [lat] => 39.1333333333 + [lat] => 39.133333333333 @@ @@ [countryCode] => ID - [lng] => 106.828611111 + [lng] => 106.82861111111 @@ @@ [countryCode] => CN - [lng] => 116.388333333 + [lng] => 116.38833333333 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/68000/thumb-67101-100.jpg [lang] => en - [lat] => 39.9288888889 + [lat] => 39.928888888889 @@ @@ [lang] => en - [lat] => 30.6333333333 + [lat] => 30.633333333333 @@ @@ [countryCode] => PK - [lng] => 69.1833333333 + [lng] => 69.183333333333 [feature] => country [thumbnailImg] => http://www.geonames.org/img/wikipedia/95000/thumb-94527-100.jpg [lang] => en [lat] => 29.4 [population] => 0 ) [18] => stdClass Object ( [summary] => : ''This article is about a place. For the biological behaviour related to ants, see Anting (bird activity).'' Anting is a town in Shanghai, People's Republic of China. Pronounced An'ting, the placename means "The Pavilion of Peace". Anting is located in the Jiading District (嘉定区) of Shanghai, on the border of the neighboring province of Jiangsu (...) [title] => Anting [wikipediaUrl] => en.wikipedia.org/wiki/Anting [elevation] => 0 [countryCode] => CN [lng] => 121.15 [feature] => city [lang] => en [lat] => 31.3 [population] => 13355925 ) [19] => stdClass Object ( [summary] => formally , is one of the 47 prefectures of Japan and, unique among the prefectures, provides certain municipal services characteristic of a city, as defined by Japanese law. Because it is the seat of the Japanese government and the Imperial Palace, and the home of the Japanese Imperial Family, Tokyo is the de facto capital of Japan (...) [title] => Tokyo [wikipediaUrl] => en.wikipedia.org/wiki/Tokyo [elevation] => 0 [countryCode] => JP [lng] => 139.76 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/4000/thumb-3415-100.jpg [lang] => en [lat] => 35.68 [population] => 8336611 ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 8) /home/clockwerx/packages-all/Services_GeoNames/tests/test_cities.phpt --- Expected +++ Actual @@ @@ [wikipedia] => en.wikipedia.org/wiki/Tokyo - [lng] => 139.691677094 + [lng] => 139.69167709351 [fcode] => PPLC [geonameId] => 1850147 - [lat] => 35.6895265931 + [lat] => 35.68952659308 @@ @@ [wikipedia] => en.wikipedia.org/wiki/Beijing - [lng] => 116.397228241 + [lng] => 116.39722824097 [fcode] => PPLC [geonameId] => 1816670 - [lat] => 39.9074977414 + [lat] => 39.907497741441 @@ @@ [wikipedia] => - [lng] => 114.150073528 + [lng] => 114.15007352829 [fcode] => PPLC [geonameId] => 1819729 - [lat] => 22.284013601 + [lat] => 22.284013600962 [population] => 7012738 ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 9) /home/clockwerx/packages-all/Services_GeoNames/tests/test_findnearbywikipedia.phpt --- Expected +++ Actual @@ @@ [countryCode] => CH - [lng] => 8.99861111111 + [lng] => 8.9986111111111 [feature] => mountain [lang] => en - [lat] => 46.9986111111 + [lat] => 46.998611111111 @@ @@ [countryCode] => CH - [lng] => 9.01333333333 + [lng] => 9.0133333333333 [feature] => waterbody [lang] => en - [lat] => 46.9808333333 + [lat] => 46.980833333333 @@ @@ [countryCode] => CH - [lng] => 8.98055555556 + [lng] => 8.9805555555556 [feature] => waterbody [thumbnailImg] => http://www.geonames.org/img/wikipedia/2000/thumb-1904-100.jpg [lang] => en - [lat] => 47.0255555556 + [lat] => 47.025555555556 @@ @@ [countryCode] => CH - [lng] => 9.06666666667 + [lng] => 9.0666666666667 [feature] => adm1st [lang] => en - [lat] => 46.9833333333 + [lat] => 46.983333333333 @@ @@ [countryCode] => CH - [lng] => 9.01388888889 + [lng] => 9.0138888888889 [feature] => waterbody [lang] => en - [lat] => 47.0869444444 + [lat] => 47.086944444444 [population] => 0 ) ) /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:59 /home/clockwerx/packages-all/Services_GeoNames/tests/AllTests.php:75 FAILURES! Tests: 37, Assertions: 0, Failures: 9.
 [2010-05-10 02:41 UTC] izi (David Jean Louis)
Hi Daniel, that's weird... are you sure you have the latest revision ? because all [lat] and [lng] in tests are now matched with EXPECTF. $ egrep -r '\[(lat,lng)\]\s*=>\s*\d+' trunk/tests/ gives nothing, so tests can't be expecting things like: [lat] => 48.6909603909
 [2010-05-10 05:44 UTC] doconnor (Daniel O'Connor)
Yeah, I know; I did see your changes. http://test.pear.php.net/unit-test-results/phpunit_results.txt though is still showing problems - and it's off SVN. ie: 2) /home/clockwerx/packages-all/Services_GeoNames/tests/test_wikipediasearch.phpt 3) /home/clockwerx/packages-all/Services_GeoNames/tests/test_siblings.phpt
 [2010-05-10 14:26 UTC] izi (David Jean Louis)
Hmm, but how can you have a diff like this: -------------------------------------------------------------------------------------------------- 2) /home/clockwerx/packages-all/Services_GeoNames/tests/test_wikipediasearch.phpt --- Expected +++ Actual @@ @@ [countryCode] => FR - [lng] => 1.44277777778 + [lng] => 1.4427777777778 [feature] => city [thumbnailImg] => http://www.geonames.org/img/wikipedia/98000/thumb-97064-100.jpg [lang] => en - [lat] => 43.6052777778 + [lat] => 43.605277777778 [population] => 0 ) ) -------------------------------------------------------------------------------------------------- When the test is : http://svn.php.net/viewvc/pear/packages/Services_GeoNames/trunk/tests/test_wikipediasearch.phpt?revision=297870&view=markup ? Anyway, if you still have failures would you mind to patch the tests please (I don't have a real 64 bit platform at the moment...) ?
 [2010-05-10 15:06 UTC] doconnor (Daniel O'Connor)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I begin to suspect that my svn update cron doesn't work so well.