forked from nschlimm/MQL5Unit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSuiteTemplate.mq5
More file actions
31 lines (25 loc) · 1.24 KB
/
SuiteTemplate.mq5
File metadata and controls
31 lines (25 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//+------------------------------------------------------------------+
//| MQLUnit |
//| Copyright 2021, Niklas Schlimm |
//| https://github.com/nschlimm/MQL5Unit |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, Niklas Schlimm"
#property version "1.00"
#include "MQLUnitTestLibrary.mqh"
// include the class under test
// add local test state, e.g. object of class under test
void OnInit() {
m_testSuite = ComposeTestsuite();
};
//+------------------------------------------------------------------+
//| Standard testsuite method implemented by user |
//+------------------------------------------------------------------+
CUnitTestSuite* ComposeTestsuite()
{
CUnitTestSuite* testSuite = new CUnitTestSuite();
// add setup methods using testSuite.AddSetupFunction()
// add unit tests using testSuite.AddUnitTestFunction(); pass testfunctions as parameter
return testSuite;
}
// add test functions, that return an instance of CUnitTestAsserts
//+------------------------------------------------------------------+