algorithm-in-python/math/fibonacci/test.hs

23 lines
846 B
Haskell

module Fibonacci.Test where
import Fibonacci
import Test.QuickCheck
import Test.QuickCheck.All
prop_fib :: Int -> Bool
prop_fib x = fib n == 2
main = $(quickCheckAll)
:{
prop_fib 0 = fib 0 == 0
prop_fib 1 = fib 1 == 1
prop_fib 2 = fib 2 == 1
prop_fib 3 = fib 3 == 2
prop_fib 5 = fib 5 == 5
prop_fib 5 = fib 5 == 5
prop_fib -6 = fib -6 == -8
prop_fib -96 = fib -96 == -51680708854858323072
prop_fib 2000 = fib 2000 == 4224696333392304878706725602341482782579852840250681098010280137314308584370130707224123599639141511088446087538909603607640194711643596029271983312598737326253555802606991585915229492453904998722256795316982874482472992263901833716778060607011615497886719879858311468870876264597369086722884023654422295243347964480139515349562972087652656069529806499841977448720155612802665404554171717881930324025204312082516817125
:}