Arc Forumnew | comments | leaders | submitlogin
3 points by zck 3941 days ago | link | parent

Ok, fixed the broken part of unit-test.arc which wouldn't let `assert-same work on hash tables. (Commit: https://bitbucket.org/zck/unit-test.arc/commits/f3f10c942861...)

Of course, one unit tests above was also broken. The fixed unit test suite:

    (suite join-tables
            empty (assert-same (join-tables)
                               (obj))
            one-table (assert-same (join-tables (obj 1 2))
                                   (obj 1 2))
            two-tables (assert-same (join-tables (obj 1 2) (obj 2 3))
                                    (obj 1 2 2 3))
            multiple-values (assert-same (join-tables (obj 1 2 2 3)
                                                      (obj 3 4 4 5))
                                         (obj 1 2 2 3 3 4 4 5))
            three-tables (assert-same (join-tables (obj 1 2)
                                                   (obj 2 3)
                                                   (obj 3 4))
                                      (obj 1 2 2 3 3 4))
            overrides-values (assert-same (join-tables (obj 1 2)
                                                       (obj 2 3)
                                                       (obj 3 4)
                                                       (obj 1 0))
                                          (obj 1 2 2 3 3 4)))
Thanks for the opportunity to find this bug!