[Blotter-commits] r1737 - pkg/quantstrat/inst/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 26 01:42:05 CET 2016


Author: bodanker
Date: 2016-03-26 01:42:04 +0100 (Sat, 26 Mar 2016)
New Revision: 1737

Modified:
   pkg/quantstrat/inst/tests/test_osMaxPos.R
Log:
Set ruletype="" for non-risk tests

Copy/paste error resulted in ruletype="risk" for tests that were
supposed to tests non-risk ruletypes.



Modified: pkg/quantstrat/inst/tests/test_osMaxPos.R
===================================================================
--- pkg/quantstrat/inst/tests/test_osMaxPos.R	2016-03-25 20:40:30 UTC (rev 1736)
+++ pkg/quantstrat/inst/tests/test_osMaxPos.R	2016-03-26 00:42:04 UTC (rev 1737)
@@ -67,16 +67,16 @@
 })
 
 test_that("increase short within limits", {
-  qty <- osMaxPos(NULL, timestamp, -1000, "", "short", portfolio, symbol, "risk")
+  qty <- osMaxPos(NULL, timestamp, -1000, "", "short", portfolio, symbol, "")
   expect_equal(qty, -1000)
-  qty <- osMaxPos(NULL, timestamp, -1000, "", NULL, portfolio, symbol, "risk")
+  qty <- osMaxPos(NULL, timestamp, -1000, "", NULL, portfolio, symbol, "")
   expect_equal(qty, -1000)
 })
 
 test_that("increase short beyond limits", {
-  qty <- osMaxPos(NULL, timestamp, -2000, "", "short", portfolio, symbol, "risk")
+  qty <- osMaxPos(NULL, timestamp, -2000, "", "short", portfolio, symbol, "")
   expect_equal(qty, -1000)
-  qty <- osMaxPos(NULL, timestamp, -2000, "", NULL, portfolio, symbol, "risk")
+  qty <- osMaxPos(NULL, timestamp, -2000, "", NULL, portfolio, symbol, "")
   expect_equal(qty, -1000)
 })
 
@@ -140,16 +140,16 @@
 })
 
 test_that("increase long within limits", {
-  qty <- osMaxPos(NULL, timestamp, 1000, "", "long", portfolio, symbol, "risk")
+  qty <- osMaxPos(NULL, timestamp, 1000, "", "long", portfolio, symbol, "")
   expect_equal(qty, 1000)
-  qty <- osMaxPos(NULL, timestamp, 1000, "", NULL, portfolio, symbol, "risk")
+  qty <- osMaxPos(NULL, timestamp, 1000, "", NULL, portfolio, symbol, "")
   expect_equal(qty, 1000)
 })
 
 test_that("increase long beyond limits", {
-  qty <- osMaxPos(NULL, timestamp, 2000, "", "long", portfolio, symbol, "risk")
+  qty <- osMaxPos(NULL, timestamp, 2000, "", "long", portfolio, symbol, "")
   expect_equal(qty, 1000)
-  qty <- osMaxPos(NULL, timestamp, 2000, "", NULL, portfolio, symbol, "risk")
+  qty <- osMaxPos(NULL, timestamp, 2000, "", NULL, portfolio, symbol, "")
   expect_equal(qty, 1000)
 })
 



More information about the Blotter-commits mailing list