Subject: | 04-lazy.t test not sorted |
Trying to install CDBI I kept getting the SQLite/2 problem. Having finally figure that one out. I kept getting failures in t/04-lazy.t as:
t\04-lazy.............NOK 2
# Failed test (t\04-lazy.t at line 20)
t\04-lazy.............NOK 3
# Failed test (t\04-lazy.t at line 21)
t\04-lazy.............NOK 4
# Failed test (t\04-lazy.t at line 22)
t\04-lazy.............NOK 5
# Failed test (t\04-lazy.t at line 23)
t\04-lazy.............NOK 6
# Failed test (t\04-lazy.t at line 24)
t\04-lazy.............ok 25/25# Looks like you failed 5 tests of 25.
t\04-lazy.............dubious
Test returned status 5 (wstat 1280, 0x500)
DIED. FAILED tests 2-6
Failed 5/25 tests, 80.00% okay
The last test was obvious as 'that' actually comes before 'this' ;)
However, the others were confusing. I changed the ok(eq_set()) sequences to is_deeply() and they now all pass. I'm not entirely sure whether this is significant or not, but thought it better to note the problem here than not :)
--- C:\wip\diffs\Class-DBI\Class-DBI-0.96/t/04-lazy.t Sun Apr 25 17:33:36 2004
+++ C:\wip\diffs\Class-DBI\Class-DBI-0.96-barbie/t/04-lazy.t Tue Mar 29 12:44:50 2005
@@ -16,12 +16,12 @@
Lazy->CONSTRUCT;
}
-ok(eq_set([ Lazy->columns('Primary') ], [qw/this/]), "Pri");
-ok(eq_set([ sort Lazy->columns('Essential') ], [qw/opop this/]), "Essential");
-ok(eq_set([ sort Lazy->columns('things') ], [qw/that this/]), "things");
-ok(eq_set([ sort Lazy->columns('horizon') ], [qw/eep orp/]), "horizon");
-ok(eq_set([ sort Lazy->columns('vertical') ], [qw/oop opop/]), "vertical");
-ok(eq_set([ sort Lazy->columns('All') ], [qw/eep oop opop orp this that/]),
+is_deeply([ Lazy->columns('Primary') ], [qw/this/], "Pri");
+is_deeply([ sort Lazy->columns('Essential') ], [qw/opop this/], "Essential");
+is_deeply([ sort Lazy->columns('things') ], [qw/that this/], "things");
+is_deeply([ sort Lazy->columns('horizon') ], [qw/eep orp/], "horizon");
+is_deeply([ sort Lazy->columns('vertical') ], [qw/oop opop/], "vertical");
+is_deeply([ sort Lazy->columns('All') ], [qw/eep oop opop orp that this/],
"All");
{