Better diagnostic
This commit is contained in:
1 parent
8cc564da96
commit
504ef84da3
1 file changed
+7
-10
@@ -32,7 +32,7 @@ std::map<std::string, std::function<int(std::vector<std::string> const &)>>
|
||||
std::unordered_map<MDP3SecurityID, Orders> orders;
|
||||
std::unordered_map<MDP3OrderKey, DeducedIceberg> icebergs;
|
||||
size_t passed_tests = 0;
|
||||
|
||||
|
||||
BackTesterHarness(std::string const &pcap)
|
||||
: icebergs(find_icebergs(pcap)) {}
|
||||
|
||||
@@ -74,17 +74,14 @@ std::map<std::string, std::function<int(std::vector<std::string> const &)>>
|
||||
}
|
||||
auto current_orders = s->orders();
|
||||
add_iceberg_annotation(current_orders);
|
||||
if (matcher.has_same_orders(current_orders).has_value()) {
|
||||
auto change = matcher.has_same_orders(current_orders);
|
||||
if (change) {
|
||||
std::cout << "Failing on event:\n " << ev.event_id
|
||||
<< std::endl;
|
||||
std::cout << "Old Orders:\n " << std::endl
|
||||
<< old_orders;
|
||||
std::cout << "Deduced:\n " << deduced << std::endl;
|
||||
std::cout << "Expected:\n " << s->order_changes()
|
||||
<< std::endl;
|
||||
<< std::endl
|
||||
<< "Error: " << change.value() << std::endl
|
||||
<< "Old Orders:\n " << std::endl;
|
||||
bts_assert(false);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
std::cout << ev.event_id << " checked out ("
|
||||
<< passed_tests++ << " passed)"
|
||||
<< std::endl;
|
||||
|
||||
Reference in new issue
Block a user