More Fire-Check Confusion

47 views
Skip to first unread message

michae...@gmail.com

unread,
Dec 3, 2018, 8:40:12 PM12/3/18
to 2018 Functional Programming TDA452 / DIT 143
Hi,

I think I may have found some more faulty fire checks.

The ones that fail are:
  • fromJust (solve allBlankSudoku)
The test-case fails because our solution does not find the exact same solution as expected.
But depending on how the algorithm got implemented the outcome for solve allBlankSudoku can't be defined in one solution.

In my opinion a better check here would be if the found solution does not contain any blank cells and isOkay.

 Here the Test-Output:
 
fromJust (solve allBlankSudoku):                               FAIL
        test/Spec/Util.hs:82:
        expected:
123456789
        456789123
        789123456
        214365897
        365897214
        897214365
        531642978
        642978531
        978531642
        
        but got:
246135879
        135879246
        879246135
        563412798
        412798563
        798563412
        654321987
        321987654
        987654321

  • blanks
The fire-check fails because the output is not in the same order.

       a =/= b
sort a ==  sort b 
 
So a similar problem as in my other post, a couple of days ago.
 
Here the Test-Output:
 
student solution vs official solution
      blanks:                                                        FAIL
        *** Failed! Falsifiable (after 1 test):
        .........
        .........
        .57.4...3
        .2.......
        .........
        3.....1..
        .....1...
        .2.....67
        ....2...6

[(8,7),(8,6),(8,5),(8,3),(8,2),(8,1),(8,0),(7,6),(7,5),(7,4),(7,3),(7,2),(7,0),(6,8),(6,7),(6,6),(6,4),(6,3),(6,2),(6,1),(6,0),(5,8),(5,7),(5,5),(5,4),(5,3),(5,2),(5,1),(4,8),(4,7),(4,6),(4,5),(4,4),(4,3),(4,2),(4,1),(4,0),(3,8),(3,7),(3,6),(3,5),(3,4),(3,3),(3,2),(3,0),(2,7),(2,6),(2,5),(2,3),(2,0),(1,8),(1,7),(1,6),(1,5),(1,4),(1,3),(1,2),(1,1),(1,0),(0,8),(0,7),(0,6),(0,5),(0,4),(0,3),(0,2),(0,1),(0,0)]
/=
[(0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),(0,7),(0,8),(1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(2,0),(2,3),(2,5),(2,6),(2,7),(3,0),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(5,1),(5,2),(5,3),(5,4),(5,5),(5,7),(5,8),(6,0),(6,1),(6,2),(6,3),(6,4),(6,6),(6,7),(6,8),(7,0),(7,2),(7,3),(7,4),(7,5),(7,6),(8,0),(8,1),(8,2),(8,3),(8,5),(8,6),(8,7)]


Kind regards,
Michael

Thomas Hallgren

unread,
Dec 4, 2018, 3:23:38 AM12/4/18
to michae...@gmail.com, 2018 Functional Programming TDA452 / DIT 143, lim...@student.chalmers.se
Hi,

These parts of tests are too picky, so disregard them for the time being.

Best regards,
Thomas H

--
You received this message because you are subscribed to the Google Groups "2018 Functional Programming TDA452 / DIT 143" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chalmers-fp-20...@googlegroups.com.
To post to this group, send email to chalmers...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chalmers-fp-2018/5546a65b-2cde-4a95-9a15-280185057536%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jannis Limperg

unread,
Dec 4, 2018, 9:05:17 AM12/4/18
to chalmers...@googlegroups.com
Hej Michael,

you're right, these tests were too fragile. I've removed the one for
`solve allBlankSudoku` and adjusted the one for `blanks`. I've also
adjusted a bunch of other tests for `blanks` and `candidates` along
similar lines.

Thanks again for these reports. They are very valuable since it's hard
to spot problems like these when I only have my own solution to test the
testsuites against.

Cheers,
Jannis


On 04.12.18 02:40, mic...@student.chalmers.se wrote:
> Hi,
>
> I think I may have found some more faulty fire checks.
>
> The ones that fail are:
>
> * *fromJust (solve allBlankSudoku)
> *
>
> The test-case fails because our solution does not find the exact
> same solution as expected.
>
> But depending on how the algorithm got implemented the outcome for
> *solve allBlankSudoku* can't be defined in one solution.
>
>
> In my opinion a better check here would be if the found solution
> does not contain any blank cells and *isOkay.*
>
>
>  Here the Test-Output:
>
>  
> |
> fromJust (solve allBlankSudoku):                               FAIL
>         test/Spec/Util.hs:82:
>         expected:
> 123456789
>         456789123
>         789123456
>         214365897
>         365897214
>         897214365
>         531642978
>         642978531
>         978531642
>         
>         but got:
> 246135879
>         135879246
>         879246135
>         563412798
>         412798563
>         798563412
>         654321987
>         321987654
>         987654321
> |
>
> * *blanks*
signature.asc
Reply all
Reply to author
Forward
0 new messages