testing1/drumb_test3.scala
changeset 166 780c40aaad27
parent 144 716042628398
equal deleted inserted replaced
165:1347bbd86c52 166:780c40aaad27
    14 val urban_rstate_res = CW6c.investment(urban_rstate_portfolio, 1978 to 2017, 100)
    14 val urban_rstate_res = CW6c.investment(urban_rstate_portfolio, 1978 to 2017, 100)
    15 val urban_blchip_res = CW6c.investment(urban_blchip_portfolio, 1978 to 2017, 100)
    15 val urban_blchip_res = CW6c.investment(urban_blchip_portfolio, 1978 to 2017, 100)
    16 
    16 
    17 // the rstate value is 30895 because of a faulty ESS.cvs file
    17 // the rstate value is 30895 because of a faulty ESS.cvs file
    18 
    18 
    19 assert(urban_rstate_res > 30885 && urban_rstate_res < 30905)
    19 // if you round after each year to a Long you get 30895 and 349597
    20 assert(urban_blchip_res > 349587 && urban_blchip_res < 349607)
    20 // if you work with doubles until the end and then round to a Long you get 30937 and 355204
       
    21 
       
    22 assert((urban_rstate_res > 30885 && urban_rstate_res < 30905) ||
       
    23        (urban_rstate_res > 30927 && urban_rstate_res < 30947))
       
    24 
       
    25 assert((urban_blchip_res > 349587 && urban_blchip_res < 349607) ||
       
    26        (urban_blchip_res > 355194 && urban_blchip_res < 355214))