equal
deleted
inserted
replaced
|
1 def myassert(cond : => Boolean) = { |
|
2 try { |
|
3 assert(cond) |
|
4 } catch { |
|
5 case _ : Throwable => System.exit(1) |
|
6 } |
|
7 } |
1 |
8 |
|
9 myassert(get_january_data("GOOG", 1980) == List()) |
2 |
10 |
3 assert(get_january_data("GOOG", 1980) == List()) |
11 myassert(get_january_data("GOOG", 2010).head == "2010-01-04,312.204773") |
4 |
12 |
5 assert(get_january_data("GOOG", 2010).head == "2010-01-04,311.349976") |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 /* |
|
11 assert(CW6c.get_prices(List("BIDU"), 2004 to 2008) == |
|
12 List(List(None), List(None), |
|
13 List(Some(6.35)), List(Some(12.241)), |
|
14 List(Some(38.188)))) |
|
15 |
|
16 |
|
17 assert(CW6c.get_prices(List("GOOG", "AAPL"), 2010 to 2012) == |
|
18 List(List(Some(311.349976), Some(27.505054)), |
|
19 List(Some(300.222351), Some(42.357094)), |
|
20 List(Some(330.555054), Some(52.852215)))) |
|
21 */ |
|