Sha256: ead8763c2cc8b082df07b15c2b77d4d2bd4f56f9f7bd1eaeaa3f6e55e5d81051

Contents?: true

Size: 1.3 KB

Versions: 379

Compression:

Stored size: 1.3 KB

Contents

pending :-
    current_prolog_flag(argv, ['--all'|_]).
pending :-
    write('\nA TEST IS PENDING!\n'),
    fail.

:- begin_tests(sum_of_multiples).

    test(low_limit, condition(true)) :-
        sum_of_multiples([3, 5], 1, Result),
        Result == 0.

    test(just_one_multiple, condition(pending)) :-
        sum_of_multiples([3, 5], 4, 3).

    test(a_few_multiples, condition(pending)) :-
        sum_of_multiples([3, 5], 10, 23).

    test(sum_more_multiples, condition(pending)) :-
        sum_of_multiples([3, 5], 100, 2318).

    test(even_more_multiples, condition(pending)) :-
        sum_of_multiples([3, 5], 1000, 233168).

    test(new_factors, condition(pending)) :-
        sum_of_multiples([7, 13, 17], 20, 51).

    test(sum_more_new_factors, condition(pending)) :-
        sum_of_multiples([4, 6], 15, 30).

    test(even_more_new_factors, condition(pending)) :-
        sum_of_multiples([5, 6, 8], 150, 4419).

    test(divisible_factor, condition(pending)) :-
        sum_of_multiples([5, 25], 51, 275).

    test(large_factors, condition(pending)) :-
        sum_of_multiples([43, 47], 10000, 2203160).

    test(every_num, condition(pending)) :-
        sum_of_multiples([1], 100, 4950).

    test(no_factors, condition(pending)) :-
        sum_of_multiples([], 10000, 0).

:- end_tests(sum_of_multiples).

Version data entries

379 entries across 379 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.158 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.157 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.156 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.155 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.154 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.153 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.152 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.151 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.150 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.149 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.148 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.147 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.146 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.145 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.144 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.143 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.142 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.141 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt
trackler-2.2.1.140 tracks/prolog/exercises/sum-of-multiples/sum_of_multiples_tests.plt