Commit 9e70be4a authored by Sascha Dewes's avatar Sascha Dewes
Browse files

More changes to the tests to match new default upperBound for arrays

parent c21bd40f
Pipeline #346908 failed with stage
in 58 seconds
......@@ -46,11 +46,11 @@ class RosAdapter_tests_structs_arrayHandlingComp: public IAdapter_tests_structs_
int counter = 0;
for(int i0 = 0; i0 < 3; i0++){
for(int i1 = 0; i1 < 1; i1++){
if(0 <= counter && counter <= 1-1){
if(0 <= counter && counter <= msg->data.size()-1){
(component->in1)(i0, i1-0) = msg->data[counter];
}
else if(0 > counter){
(component->in1)(i0, i1+1-1-0+1) = 0;
(component->in1)(i0, i1+msg->data.size()-1-0+1) = 0;
}
else{
(component->in1)(i0, i1) = 0;
......@@ -66,11 +66,11 @@ class RosAdapter_tests_structs_arrayHandlingComp: public IAdapter_tests_structs_
int counter = 0;
for(int i0 = 0; i0 < 4; i0++){
for(int i1 = 0; i1 < 4; i1++){
if(0 <= counter && counter <= 4-1){
if(0 <= counter && counter <= msg->data.size()-1){
(component->in2)(i0, i1) = msg->data[counter] != 0;
}
else if(0 > counter){
(component->in2)(i0, i1+4-1-0+1) = 0;
(component->in2)(i0, i1+msg->data.size()-1-0+1) = 0;
}
else{
(component->in2)(i0, i1) = 0;
......@@ -86,11 +86,11 @@ class RosAdapter_tests_structs_arrayHandlingComp: public IAdapter_tests_structs_
int counter = 0;
for(int i0 = 0; i0 < 1; i0++){
for(int i1 = 0; i1 < 10; i1++){
if(0 <= counter && counter <= 10-1){
if(0 <= counter && counter <= msg->data.size()-1){
(component->in3)(i0, i1-0) = msg->poses[counter].pose.orientation.x;
}
else if(0 > counter){
(component->in3)(i0, i1+10-1-0+1) = 0;
(component->in3)(i0, i1+msg->data.size()-1-0+1) = 0;
}
else{
(component->in3)(i0, i1) = 0;
......
......@@ -40,7 +40,7 @@ class RosAdapter_test_basicGenericInstance_basicGeneric: public IAdapter_test_ba
(component->mat1)(i0, i1) = msg->data[counter];
}
else if(0 > counter){
(component->mat1)(i0, i1+n-1-0+1) = 0;
(component->mat1)(i0, i1+msg->data.size()-1-0+1) = 0;
}
else{
(component->mat1)(i0, i1) = 0;
......
......@@ -41,11 +41,11 @@ class RosAdapter_tests_structs_matrixTypesComp: public IAdapter_tests_structs_ma
int counter = 0;
for(int i0 = 0; i0 < 3; i0++){
for(int i1 = 0; i1 < 1; i1++){
if(0 <= counter && counter <= 1-1){
if(0 <= counter && counter <= msg->data.size()-1){
(component->in1)(i0, i1) = msg->data[counter];
}
else if(0 > counter){
(component->in1)(i0, i1+1-1-0+1) = 0;
(component->in1)(i0, i1+msg->data.size()-1-0+1) = 0;
}
else{
(component->in1)(i0, i1) = 0;
......@@ -61,11 +61,11 @@ class RosAdapter_tests_structs_matrixTypesComp: public IAdapter_tests_structs_ma
int counter = 0;
for(int i0 = 0; i0 < 4; i0++){
for(int i1 = 0; i1 < 4; i1++){
if(0 <= counter && counter <= 4-1){
if(0 <= counter && counter <= msg->data.size()-1){
(component->in2)(i0, i1) = msg->data[counter] != 0;
}
else if(0 > counter){
(component->in2)(i0, i1+4-1-0+1) = 0;
(component->in2)(i0, i1+msg->data.size()-1-0+1) = 0;
}
else{
(component->in2)(i0, i1) = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment