-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a38702
commit e726e3c
Showing
2 changed files
with
171 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module IkedaPatternTest exposing (..) | ||
|
||
import Expect exposing (Expectation) | ||
import Fuzz exposing (Fuzzer, int, list, string) | ||
import Pages.IkedaPattern exposing (primes, quadraticResidueSet) | ||
import Set | ||
import Test exposing (..) | ||
|
||
|
||
suite : Test | ||
suite = | ||
describe "Ikeda pattern module" | ||
[ describe "uniformly redundant array" | ||
[ test "build quadratic residue modulo p where p is a prime number" | ||
(\_ -> | ||
quadraticResidueSet 11 | ||
|> Expect.equal (Set.fromList [ 1, 3, 4, 5, 9 ]) | ||
) | ||
, test "return empty set when p not in our list of primes" | ||
(\_ -> | ||
quadraticResidueSet 16 | ||
|> Expect.equal Set.empty | ||
) | ||
] | ||
] |