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