Check-in [95d5eacadf]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add more FDDD tests, clean up whitespace in tests, and fix bugs exposed in testing.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:95d5eacadf57287a5d82c812d077097676d3e9d6
User & Date: kbk 2014-08-02 23:54:08
Context
2014-08-03
00:17
Add more FDDD tests, clean up whitespace in tests, and fix bugs exposed in testing. check-in: 5d0a10221b user: kbk tags: trunk
2014-08-02
23:54
Add more FDDD tests, clean up whitespace in tests, and fix bugs exposed in testing. check-in: 95d5eacadf user: kbk tags: trunk
23:48
Add more FDDD tests, clean up whitespace in tests, and fix bugs exposed in testing. check-in: 22d056d9e0 user: kbk tags: trunk
Changes

Changes to tests/fddd.test.

595
596
597
598
599
600
601





























































602
603
604
605
606
607
608
609
610
            dict unset shouldhave [dict get $d parent]:[dict get $d child]
        }
        dict keys $shouldhave
    }
    -cleanup {db destroy}
    -result {0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7}
}






























































cleanupTests
return

# Local Variables:
# mode: tcl
# c-basic-offset: 4
# indent-tabs-mode: nil
# End:







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
            dict unset shouldhave [dict get $d parent]:[dict get $d child]
        }
        dict keys $shouldhave
    }
    -cleanup {db destroy}
    -result {0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7}
}

# fddd-12 - join

test fddd-12.1 {join - relation doesn't exist} {
    -setup makeDB
    -body {
        list [catch {
            db join rubbish isParentOf troll
        } result] $result $::errorCode
    }
    -cleanup {db destroy}
    -result {1 {relation "rubbish" is not defined in this database} {FDDD RelationNotDefined rubbish}}
}

test fddd-12.2 {join - relation doesn't exist} {
    -setup makeDB
    -body {
        list [catch {
            db join result rubbish troll
        } result] $result $::errorCode
    }
    -cleanup {db destroy}
    -result {1 {relation "rubbish" is not defined in this database} {FDDD RelationNotDefined rubbish}}
}

test fddd-12.3 {join - relation doesn't exist} {
    -setup makeDB
    -body {
        list [catch {
            db join result isParentOf rubbish
        } result] $result $::errorCode
    }
    -cleanup {db destroy}
    -result {1 {relation "rubbish" is not defined in this database} {FDDD RelationNotDefined rubbish}}
}

test fddd-12.4 {join} {*}{
    -setup {
        makeDB
        foreach i {0 2} {
            loadTroll $i
        }
    }
    -body {
        eval [db join result isParentOf troll]
        set r \n
        ::db enumerate d result {
            append r {        } $d \n
        }
        append r {    }
        string map [list \t {        }] $r
    }
    -result {
        parent 0 child 0
        parent 0 child 1
        parent 2 child 4
        parent 2 child 5
    }
    -cleanup {db destroy}
}


cleanupTests
return

# Local Variables:
# mode: tcl
# c-basic-offset: 4
# indent-tabs-mode: nil
# End: