Re: DBD::Oracle Release Candidate 1

"H.Merijn Brand" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Wed, 16 Feb 2011 12:32:12 +0100, "H.Merijn Brand"
<[email protected]> wrote:

> http://www.pythian.com/news/wp-content/uploads/DBD-Oracle-1.28_RC_1.zip
> 
> You need to work on longdouble support I guess

Here's a patch to make the test PASS on all systems, but I'm not sure
if I'm using a carpet to shuv the problems under ...

--- t/58object.t.org    2011-02-17 13:33:48.000000000 +0100
+++ t/58object.t        2011-02-17 13:33:25.000000000 +0100
@@ -82,9 +82,9 @@ $dbh->do(qq{ INSERT INTO $table VALUES (
             or die $dbh->errstr;
 $dbh->do(qq{ INSERT INTO $table VALUES (2, $sub_type(NULL, 'obj2',
                     TO_DATE('2004-11-30 14:27:18', 'YYYY-MM-DD HH24:MI:SS'),
-                    12345.6789)) }
+                    12345.9375)) }
             ) or die $dbh->errstr;
-$dbh->do(qq{ INSERT INTO $table VALUES (3, $sub_type(5, 'obj3', NULL, 777.666)) }
+$dbh->do(qq{ INSERT INTO $table VALUES (3, $sub_type(5, 'obj3', NULL, 777.875)) }
             ) or die $dbh->errstr;

 $dbh->do(qq{ CREATE OR REPLACE TYPE $inner_type AS OBJECT (
@@ -159,14 +159,14 @@ ok (scalar @row2, 'new: Fetch second row
 cmp_ok(ref $row2[1], 'eq', 'DBD::Oracle::Object', 'new: Row 2 column 2 is an DBD::Oracle::Object');
 cmp_ok(uc $row2[1]->type_name, "eq", uc "$schema.$sub_type", "new: Row 2 column 2 object type");
 is_deeply([$row2[1]->attributes], ['NUM', undef, 'NAME', 'obj2',
-            'DATETIME', '2004-11-30T14:27:18', 'AMOUNT', '12345.6789'], "new: Row 1 column 2 object attributes");
+            'DATETIME', '2004-11-30T14:27:18', 'AMOUNT', '12345.9375'], "new: Row 1 column 2 object attributes");

 @row3 = $sth->fetchrow();
 ok (scalar @row3, 'new: Fetch third row');
 cmp_ok(ref $row3[1], 'eq', 'DBD::Oracle::Object', 'new: Row 3 column 2 is an DBD::Oracle::Object');
 cmp_ok(uc $row3[1]->type_name, "eq", uc "$schema.$sub_type", "new: Row 3 column 2 object type");
 is_deeply([$row3[1]->attributes], ['NUM', 5, 'NAME', 'obj3',
-            'DATETIME', undef, 'AMOUNT', '777.666'], "new: Row 1 column 2 object attributes");
+            'DATETIME', undef, 'AMOUNT', '777.875'], "new: Row 1 column 2 object attributes");

 ok (!$sth->fetchrow(), 'new: No more rows expected');

@@ -178,7 +178,7 @@ my $expected_hash = {
         NUM         => 5,
         NAME        => 'obj3',
         DATETIME    => undef,
-        AMOUNT      => 777.666,
+        AMOUNT      => 777.875,
     };
 is_deeply($obj->attr_hash, $expected_hash, 'DBD::Oracle::Object->attr_hash');
 is_deeply($obj->attr, $expected_hash, 'DBD::Oracle::Object->attr');


-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00,
11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.3 and AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.