Initial commit

This commit is contained in:
Matthias
2017-04-11 15:49:55 +02:00
commit 3d8f381bae
106 changed files with 4407 additions and 0 deletions
+10
View File
@@ -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);
+4
View File
@@ -0,0 +1,4 @@
name=AtomicActivity1
entries=1
entry.0=atomic1.code
+9
View File
@@ -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);
+4
View File
@@ -0,0 +1,4 @@
name=AtomicActivity2
entries=1
entry.0=atomic2.code
+44
View File
@@ -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);
+4
View File
@@ -0,0 +1,4 @@
name=AtomicActivity3
entries=1
entry.0=atomic3.code
+12
View File
@@ -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;
+8
View File
@@ -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());
}