% $Id: factorial_tests.erl,v 1.3 2019/12/09 21:38:30 leavens Exp leavens $ -module(factorial_tests). -export([main/0]). -import(factorial,[fact/1]). -import(testing,[dotests/2,eqTest/3]). main() -> compile:file(factorial), dotests("factorialtests $Revision: 1.3 $",tests()). -spec tests() -> [testing:testCase(non_neg_integer())]. tests() -> [eqTest(factorial:fact(0),"==",1), eqTest(fact(1),"==",1), eqTest(fact(3),"==",6), eqTest(fact(5),"==",120), eqTest(fact(10),"==",3628800), eqTest(fact(20),"==",2432902008176640000), eqTest(fact(25),"==",15511210043330985984000000), eqTest(fact(100),"==",93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000) ].