Initial commit
This commit is contained in:
Executable
+10
@@ -0,0 +1,10 @@
|
||||
std::cout << "AtomicActivity1:" << std::endl
|
||||
<< "\tinput: " << sin->input.getValue() << std::endl;
|
||||
if (!sin->input.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: input [" << sin->input.getValue() << "] is not true.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
sout->output.setValue(10);
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
name=AtomicActivity1
|
||||
entries=1
|
||||
entry.0=atomic1.code
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
std::cout << "AtomicActivity2:" << std::endl
|
||||
<< "\tinput: " << sin->input.getValue() << std::endl;
|
||||
if (sin->input.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: input [" << sin->input.getValue() << "] is not false.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
sout->output.setValue(-10);
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
name=AtomicActivity2
|
||||
entries=1
|
||||
entry.0=atomic2.code
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
std::cout << "AtomicActivity3:" << std::endl;
|
||||
if (sin->input.getSize() <= 0) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: input size [" << sin->input.getSize() << "] is not greater than zero.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->input.getSize() != sin->gIn1.getSize()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: input [" << sin->input.getSize() << "] and gIn1 [" << sin->gIn1.getSize() << "] differ in size.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
std::cout << "\tgIn1: [ ";
|
||||
bool isFirst = true;
|
||||
for (wfr_id_t t = 0; t < sin->gIn1.getSize(); t++) {
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
std::cout << ", ";
|
||||
}
|
||||
std::cout << sin->gIn1.getEntryValue(t);
|
||||
}
|
||||
std::cout << " ]" << std::endl;
|
||||
std::cout << "\tinput: [ ";
|
||||
isFirst = true;
|
||||
for (wfr_id_t t = 0; t < sin->input.getSize(); t++) {
|
||||
if ( (sin->gIn1.getEntryValue(t) && sin->input.getEntryValue(t) != 10) ||
|
||||
(!sin->gIn1.getEntryValue(t) && sin->input.getEntryValue(t) != -10) ) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: input [" << sin->input.getEntryValue(t) << "] and gIn1 [" << sin->gIn1.getEntryValue(t) << "] do not match.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
std::cout << ", ";
|
||||
}
|
||||
std::cout << sin->input.getEntryValue(t);
|
||||
}
|
||||
std::cout << " ]" << std::endl;
|
||||
sout->isOk.setValue(true);
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
name=AtomicActivity3
|
||||
entries=1
|
||||
entry.0=atomic3.code
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
wfr::lwd::iwir_collection<wfr::lwd::_lwd_iwir_basetype_bool, 1> elements1;
|
||||
elements1.init(8);
|
||||
elements1.setEntryValue(0, true);
|
||||
elements1.setEntryValue(1, false);
|
||||
elements1.setEntryValue(2, true);
|
||||
elements1.setEntryValue(3, false);
|
||||
elements1.setEntryValue(4, true);
|
||||
elements1.setEntryValue(5, false);
|
||||
elements1.setEntryValue(6, true);
|
||||
elements1.setEntryValue(7, false);
|
||||
elements1.setFinalised(true);
|
||||
wfInput.gIn1 = elements1;
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
std::cout << "wfOutput:" << std::endl
|
||||
<< "\tisOk: " << wfOutput.isOk.getValue() << std::endl;
|
||||
if (!wfOutput.isOk.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: isOk [" << wfOutput.isOk.getValue() << "] is not true.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
Reference in New Issue
Block a user