Skip to content

Commit 43384a1

Browse files
committed
Migrated compoundoption.cpp
1 parent b3473d9 commit 43384a1

7 files changed

+8
-56
lines changed

test-suite/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ set(QL_TEST_SOURCES
174174
)
175175

176176
set(QL_TEST_HEADERS
177-
compoundoption.hpp
178177
convertiblebonds.hpp
179178
covariance.hpp
180179
creditdefaultswap.hpp

test-suite/Makefile.am

-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ QL_TEST_SRCS = \
174174
zerocouponswap.cpp
175175

176176
QL_TEST_HDRS = \
177-
compoundoption.hpp \
178177
convertiblebonds.hpp \
179178
covariance.hpp \
180179
creditdefaultswap.hpp \

test-suite/compoundoption.cpp

+8-13
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
FOR A PARTICULAR PURPOSE. See the license for more details.
1818
*/
1919

20-
#include "compoundoption.hpp"
20+
#include "toplevelfixture.hpp"
2121
#include "utilities.hpp"
2222
#include <ql/instruments/compoundoption.hpp>
2323
#include <ql/pricingengines/exotic/analyticcompoundoptionengine.hpp>
@@ -78,8 +78,11 @@ namespace compound_option_test {
7878

7979
}
8080

81+
BOOST_FIXTURE_TEST_SUITE(QuantLibTest, TopLevelFixture)
8182

82-
void CompoundOptionTest::testPutCallParity(){
83+
BOOST_AUTO_TEST_SUITE(CompoundOptionTest)
84+
85+
BOOST_AUTO_TEST_CASE(testPutCallParity){
8386

8487
BOOST_TEST_MESSAGE("Testing compound-option put-call parity...");
8588

@@ -195,7 +198,7 @@ void CompoundOptionTest::testPutCallParity(){
195198
}
196199
}
197200

198-
void CompoundOptionTest::testValues(){
201+
BOOST_AUTO_TEST_CASE(testValues){
199202

200203
BOOST_TEST_MESSAGE("Testing compound-option values and greeks...");
201204

@@ -345,14 +348,6 @@ void CompoundOptionTest::testValues(){
345348
}
346349
}
347350

351+
BOOST_AUTO_TEST_SUITE_END()
348352

349-
test_suite* CompoundOptionTest::suite() {
350-
auto* suite = BOOST_TEST_SUITE("Compound option tests");
351-
352-
suite->add(QUANTLIB_TEST_CASE(&CompoundOptionTest::testValues));
353-
suite->add(QUANTLIB_TEST_CASE(&CompoundOptionTest::testPutCallParity));
354-
355-
return suite;
356-
}
357-
358-
353+
BOOST_AUTO_TEST_SUITE_END()

test-suite/compoundoption.hpp

-35
This file was deleted.

test-suite/quantlibtestsuite.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# include <ql/auto_link.hpp>
1717
#endif
1818

19-
#include "compoundoption.hpp"
2019
#include "convertiblebonds.hpp"
2120
#include "covariance.hpp"
2221
#include "creditdefaultswap.hpp"
@@ -185,7 +184,6 @@ test_suite* init_unit_test_suite(int, char* []) {
185184

186185
auto* test = BOOST_TEST_SUITE("QuantLib test suite");
187186

188-
test->add(CompoundOptionTest::suite());
189187
test->add(ConvertibleBondTest::suite());
190188
test->add(CovarianceTest::suite());
191189
test->add(CPISwapTest::suite());

test-suite/testsuite.vcxproj

-1
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,6 @@
810810
<ClCompile Include="quantlibtestsuite.cpp" />
811811
</ItemGroup>
812812
<ItemGroup>
813-
<ClInclude Include="compoundoption.hpp" />
814813
<ClInclude Include="convertiblebonds.hpp" />
815814
<ClInclude Include="covariance.hpp" />
816815
<ClInclude Include="creditdefaultswap.hpp" />

test-suite/testsuite.vcxproj.filters

-3
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,6 @@
527527
</ClCompile>
528528
</ItemGroup>
529529
<ItemGroup>
530-
<ClInclude Include="compoundoption.hpp">
531-
<Filter>Header Files</Filter>
532-
</ClInclude>
533530
<ClInclude Include="convertiblebonds.hpp">
534531
<Filter>Header Files</Filter>
535532
</ClInclude>

0 commit comments

Comments
 (0)