Commit 5c4bf32c authored by Florian Hölzl's avatar Florian Hölzl
Browse files

added STLC test example

refs 727
parent 5625b20c
......@@ -63,7 +63,7 @@ public class CCodeEquivalenceTest {
private final static int TIMEOUT_IN_MILLISECONDS = 50000;
/** The test-data area. */
private static final String TEST_DATA_AREA = "test-data/gcctest/";
private static final String TEST_DATA_AREA = "test-data/gcctest/stlc/";
/** The executable of the deployment generator. */
private DeploymentExecutable executable;
......@@ -82,8 +82,8 @@ public class CCodeEquivalenceTest {
FileProject project = loadProjectFromPlugin(
Af3TestingActivator.PLUGIN_ID, TEST_DATA_AREA
+ "ACCRefinementWithLocalMachineDeployment.af3_20",
true);
// + "acc/ACCRefinementWithLocalMachineDeployment.af3_20"
+ "SimpleTrafficLightsGCCEquivalenceTest.af3_20", true);
Deployment deployment = pickFirstInstanceOf(Deployment.class,
project.getRootElementsList());
IExecutionTarget target = IExecutionService.INSTANCE
......@@ -139,11 +139,10 @@ public class CCodeEquivalenceTest {
assertTrue(new File(buildDir, "LocalMachine.run").exists());
BuiltProgramRunner localRunner = new BuiltProgramRunner(
"LocalMachine.run", buildDir);
"./LocalMachine.run", buildDir);
result = localRunner.runTool().get(TIMEOUT_IN_MILLISECONDS);
assertNotNull(result);
assertRunSuccess(result, "Hello world");
}
/** Copies the test data files to the target location. */
......
/* written by hoelzl for AutoFOCUS 3 GCC test. */
#include "inc/InputOutput.h"
void init_InputOutput(void) {
}
void term_InputOutput(void) {
}
void prepare_input_InputOutput(void) {
}
void finish_input_InputOutput(void) {
}
void prepare_output_InputOutput(void) {
}
void finish_output_InputOutput(void) {
}
TYPE_boolean is_noval_InputOutput_ctrlInRequest(void) {
return false;
}
TYPE_Signal read_InputOutput_ctrlInRequest(void) {
return Present();
}
void set_noval_InputOutput_ctrlOutTrafficSignal(void) {
}
void write_InputOutput_ctrlOutTrafficSignal(TYPE_TrafficColor value) {
}
void set_noval_InputOutput_ctrlOutPedestrianSignal(void) {
}
void write_InputOutput_ctrlOutPedestrianSignal(TYPE_PedestrianColor value) {
}
void set_noval_InputOutput_ctrlOutIndicatorSignalA(void) {
}
void write_InputOutput_ctrlOutIndicatorSignalA(TYPE_IndicatorSignal value) {
}
void set_noval_InputOutput_ctrlOutIndicatorSignalB(void) {
}
void write_InputOutput_ctrlOutIndicatorSignalB(TYPE_IndicatorSignal value) {
}
/* written by hoelzl for AutoFOCUS 3 GCC test.*/
#ifndef __HEADER_InputOutput_h
#define __HEADER_InputOutput_h
#include "inc-gen/data_dictionary.h"
extern void init_InputOutput(void);
extern void term_InputOutput(void);
extern void prepare_input_InputOutput(void);
extern void finish_input_InputOutput(void);
extern void prepare_output_InputOutput(void);
extern void finish_output_InputOutput(void);
extern TYPE_boolean is_noval_InputOutput_ctrlInRequest(void);
extern TYPE_Signal read_InputOutput_ctrlInRequest(void);
extern void set_noval_InputOutput_ctrlOutTrafficSignal(void);
extern void write_InputOutput_ctrlOutTrafficSignal(TYPE_TrafficColor);
extern void set_noval_InputOutput_ctrlOutPedestrianSignal(void);
extern void write_InputOutput_ctrlOutPedestrianSignal(TYPE_PedestrianColor);
extern void set_noval_InputOutput_ctrlOutIndicatorSignalA(void);
extern void write_InputOutput_ctrlOutIndicatorSignalA(TYPE_IndicatorSignal);
extern void set_noval_InputOutput_ctrlOutIndicatorSignalB(void);
extern void write_InputOutput_ctrlOutIndicatorSignalB(TYPE_IndicatorSignal);
#endif // __HEADER_InputOutput_h
/* written by hoelzl for AutoFOCUS 3 GCC test. */
#include "inc-gen/system.h"
#include <stdio.h>
int main(int argc, char **argv) {
printf("Hello world %f!\n", 2.0);
}
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