Skip to content

Commit 8ad0d0c

Browse files
committed
chore(tests): add tests of 2 and 1000
1 parent f9baf6e commit 8ad0d0c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/math/sieve_of_eratosthenes.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,28 @@ mod tests {
8282

8383
sieve_tests! {
8484
test_0: (0, Vec::<usize>::new()),
85+
test_2: (2, vec![2]),
8586
test_11: (11, vec![2, 3, 5, 7, 11]),
8687
test_25: (25, vec![2, 3, 5, 7, 11, 13, 17, 19, 23]),
8788
test_33: (33, vec![2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]),
8889
test_100: (100, vec![
8990
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97
9091
]),
92+
test_1000: (1000, vec![
93+
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61,
94+
67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137,
95+
139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199,
96+
211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277,
97+
281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359,
98+
367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439,
99+
443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521,
100+
523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607,
101+
613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683,
102+
691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773,
103+
787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863,
104+
877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967,
105+
971, 977, 983, 991, 997
106+
]
107+
),
91108
}
92109
}

0 commit comments

Comments
 (0)