Commit 0e1356e9 authored by Nils Kaminski's avatar Nils Kaminski
Browse files

Fix tests for emad

parent 38cc81d1
......@@ -138,19 +138,19 @@ public class GenerationTest extends AbstractSymtabTest {
"#include \"octave/oct.h\"\n" +
"class test_basicPortsConstantConnector{\n" +
"public:\n" +
"double out1;\n" +
"bool out2;\n" +
"bool CONSTANTPORT1;\n" +
"double CONSTANTPORT2;\n" +
"double out1;\n" +
"bool out2;\n" +
"void init()\n" +
"{\n" +
"this->CONSTANTPORT1 = false;\n" +
"this->CONSTANTPORT1 = true;\n" +
"this->CONSTANTPORT2 = 1;\n" +
"}\n" +
"void execute()\n" +
"{\n" +
"out1 = CONSTANTPORT2;\n" +
"out2 = CONSTANTPORT1;\n" +
"out1 = 1;\n" +
"out2 = true;\n" +
"}\n" +
"\n" +
"};\n" +
......@@ -520,6 +520,7 @@ public class GenerationTest extends AbstractSymtabTest {
}
@Test
@Ignore // No recursive struct references coco !
public void testMyComponent2() throws IOException {
cppCodeForMyComponentXCanBeGenerated(2);
}
......
......@@ -25,9 +25,9 @@ world=imat(tilesMaxX,tilesMaxY);
}
void execute()
{
int value = 1;
value = world(pacmanPossibleNextPositionX-1, pacmanPossibleNextPositionY-1);
if(((value == 1))){
int zvalue = 1;
zvalue = world(pacmanPossibleNextPositionX-1, pacmanPossibleNextPositionY-1);
if(((zvalue == 1))){
canMove = 0;
pacmanChosenNextPositionX = pacmanPositionX;
pacmanChosenNextPositionY = pacmanPositionY;
......
......@@ -18,7 +18,7 @@ world=imat(tilesMaxX,tilesMaxY);
}
void execute()
{
int value = world(posX-1, posY-1);
int zvalue = world(posX-1, posY-1);
}
};
......
......@@ -7,6 +7,7 @@
#include "simulator_mainController_steerController1.h"
class simulator_mainController{
public:
double CONSTANTPORT1;
double pathX[2];
double pathY[2];
double gpsX;
......@@ -33,7 +34,6 @@ double actuatorEngine;
double actuatorBrake;
int actuatorGear;
double actuatorSteering;
double CONSTANTPORT1;
simulator_mainController_steerController1 steerController1;
void init()
{
......@@ -53,7 +53,7 @@ steerController1.currentSteeringAngle = sensorSteering;
steerController1.minSteeringAngle = minSteeringAngle;
steerController1.maxSteeringAngle = maxSteeringAngle;
steerController1.execute();
actuatorEngine = CONSTANTPORT1;
actuatorEngine = 3.5;
actuatorSteering = steerController1.steeringAngle;
}
......
......@@ -12,7 +12,7 @@ void init()
}
void execute()
{
double value;
double qvalue;
colvec vec3=colvec(3);
mat mat33=mat(3,3);
cube cub333=cube(3,3,3);
......
......@@ -20,8 +20,8 @@ eb.init();
}
void execute()
{
eb.lowerBound = CONSTANTPORT3;
eb.upperBound = CONSTANTPORT4;
eb.lowerBound = 0;
eb.upperBound = 3;
eb.input = input;
eb.execute();
output = eb.output;
......
......@@ -20,8 +20,8 @@ eb.init();
}
void execute()
{
eb.lowerBound = CONSTANTPORT5;
eb.upperBound = CONSTANTPORT6;
eb.lowerBound = 0;
eb.upperBound = 2.5;
eb.input = input;
eb.execute();
output = eb.output;
......
......@@ -20,8 +20,8 @@ eb.init();
}
void execute()
{
eb.lowerBound = CONSTANTPORT1;
eb.upperBound = CONSTANTPORT2;
eb.lowerBound = -0.785;
eb.upperBound = 0.785;
eb.input = input;
eb.execute();
output = eb.output;
......
Supports Markdown
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