--- a/marking/drumb_test3.scala Tue Jan 16 10:47:29 2018 +0000
+++ b/marking/drumb_test3.scala Fri Jan 19 14:09:08 2018 +0000
@@ -1,9 +1,3 @@
-//println("starting test now")
-
-import scala.concurrent._
-import scala.concurrent.duration._
-import ExecutionContext.Implicits.global
-import scala.language.postfixOps
val test_data = List(List(Some(71.539941), None), List(Some(76.974614), None),
List(Some(65.226685), Some(6.35)), List(Some(78.354649), Some(12.241)),
@@ -14,14 +8,9 @@
List(Some(0.20126676681483952), Some(0.9277165354330709)),
List(Some(0.09141762603007778), Some(2.119679764725104)))
-lazy val f = Future {
- assert((yearly_yield(test_deltas, 100, 0) - 107).abs <= 2)
- assert((yearly_yield(test_deltas, 100, 1) - 85).abs <= 2)
- assert((yearly_yield(test_deltas, 100, 2) - 156).abs <= 2)
- assert((yearly_yield(test_deltas, 100, 3) - 210).abs <= 2)
- assert((investment(List("IBM", "BIDU"), 2004 to 2008, 100) - 298).abs <= 10)
-}
+assert((yearly_yield(test_deltas, 100, 0) - 107).abs <= 2)
+assert((yearly_yield(test_deltas, 100, 1) - 85).abs <= 2)
+assert((yearly_yield(test_deltas, 100, 2) - 156).abs <= 2)
+assert((yearly_yield(test_deltas, 100, 3) - 210).abs <= 2)
+assert((investment(List("IBM", "BIDU"), 2004 to 2008, 100) - 298).abs <= 10)
-
-Await.result(f, 180 second)
-