% $Id: SeqTest.oz,v 1.1 2007/10/22 04:40:07 leavens Exp leavens $ \insert 'TestingNoStop.oz' \insert 'SeqInClass2.oz' {StartTesting 'Seq'} declare Ones = {Repeat 1} Halves = {Generate fun {$ N} 1.0/{IntToFloat {Pow 2 N}} end} {Test {Nth Ones 0} '==' 1} {Test {Nth Ones 33} '==' 1} {Test {Nth Ones 4020} '==' 1} {Test {Nth Halves 0} '==' 1.0} {Test {Nth Halves 1} '==' 0.5} {Test {Nth Halves 2} '==' 0.25} {Test {Nth Halves 3} '==' 0.125} % The following is a cheap way to get an approximately equal to test {Test {FloatToString {Nth Halves 30}} '==' "9.3132e~010"} {DoneTesting}