Initial commit
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
std::cout << "AtomicActivity2:" << std::endl
|
||||
<< "\tin2: " << sin->in2.getValue() << std::endl;
|
||||
#include <sstream>
|
||||
if (sin->in2.getValue() <= 0) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: in2 value [" << sin->in2.getValue() << "] is not greater than zero.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->in2.getValue() != sin->in1.getSize()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: in1 collection size [" << sin->in1.getSize() << "] is not equal in2 [" << sin->in2.getValue() << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
std::cout << "\tin1: [ ";
|
||||
bool isFirst = true;
|
||||
for (wfr_id_t t = 0; t < sin->in1.getSize(); t++) {
|
||||
if (sin->in1.getEntryValue(t) != t+1) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: in1 collection value index [" << t << "] does not have correct value [" << sin->in1.getEntryValue(t)<< "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
std::cout << ", ";
|
||||
}
|
||||
std::cout << sin->in1.getEntryValue(t);
|
||||
}
|
||||
std::cout << " ]" << std::endl;
|
||||
sout->out1 = sin->in1;
|
||||
sout->isOk.setValue(true);
|
||||
Reference in New Issue
Block a user