#include <boost/test/included/unit_test.hpp>
#include <boost/exception/all.hpp>
#include <filesystem>
#include "Flow.h"
#include "Jet.h"
#include "SelfAwareBranch.h"
◆ BOOST_TEST_MODULE
◆ BOOST_AUTO_TEST_CASE() [1/3]
BOOST_AUTO_TEST_CASE |
( |
plain_type |
| ) |
|
25 BOOST_TEST_MESSAGE(
"Filling the tree" );
28 auto tOut = flow.GetOutputTree(
"self_aware_branch.root");
39 BOOST_TEST_MESSAGE(
"Testing output values" );
43 auto br1 = flow.GetBranchReadOnly<
int>(
"branch1"),
44 br2 = flow.GetBranchReadOnly<
int>(
"branch2");
54 fs::remove(
"self_aware_branch.root");
◆ BOOST_AUTO_TEST_CASE() [2/3]
BOOST_AUTO_TEST_CASE |
( |
polymorphism |
| ) |
|
98 BOOST_TEST_MESSAGE(
"Filling the tree" );
101 auto tOut = flow.GetOutputTree(
"self_aware_branch.root");
102 auto fill = [](
int v) ->
int {
return v;};
106 for (
auto&& branch: {plain_branch, vector_branch})
109 for (
auto&& branch: {plain_branch, vector_branch})
113 BOOST_TEST_MESSAGE(
"Testing output values" );
117 auto plain_branch = flow.GetBranchReadOnly<
int> (
"plain_branch");
118 auto vector_branch = flow.GetBranchReadOnly<vector<int>>(
"vector_branch");
125 fs::remove(
"self_aware_branch.root");
◆ BOOST_AUTO_TEST_CASE() [3/3]
BOOST_AUTO_TEST_CASE |
( |
vector_type |
| ) |
|
59 BOOST_TEST_MESSAGE(
"Filling the tree" );
62 auto tOut = flow.GetOutputTree(
"self_aware_branch.root");
76 BOOST_TEST_MESSAGE(
"Testing output values" );
80 auto br1 = flow.GetBranchReadOnly<vector<int>>(
"branch1"),
81 br2 = flow.GetBranchReadOnly<vector<int>>(
"branch2");
93 fs::remove(
"self_aware_branch.root");