Commit 222e0a30 authored by Daniel Tuulik's avatar Daniel Tuulik

Update test mains for QGen Ada simulation tests

parent 6432ea1c
......@@ -5,7 +5,7 @@ DISABLED_BENCHMARKS=test1/ test2/ test3/ test4/ test5/ test6/ test7/ test9/ \
test12/ test-branchcoverage/
BENCHMARK_CASES=$(filter-out $(DISABLED_BENCHMARKS), $(sort $(dir $(wildcard */))))
export EXPECTED_FAILURES=test-typecheck/ test-procedure/ test-demoopengeode/
export EXPECTED_FAILURES=test-typecheck/ test-procedure/ test-demoopengeode/ test-branchcoverage/
test-parse:
@python3 test.py test-parse $(TEST_CASES)
......
#include <math.h>
#include <stdio.h>
/* Ada code external interface */
extern void challenge_PI_run();
extern void challenge_PI_any_one();
extern int adainit();
//extern long long l_result;
/* Provide code called by the Ada state machine as external procedure */
void challenge_RI_pow(long long *a, long long *b, long long *res)
{
*res = (long long)pow((double)*a, (double)*b);
}
int main()
{
adainit();
challenge_initStates();
challenge_PI_run();
challenge_PI_run();
//printf("Internal state: %lld\n", l_result);
challenge_PI_any_one();
challenge_PI_run();
return 0;
}
......@@ -19,11 +19,11 @@ int main()
{
adainit();
challenge_initStates();
challenge_run();
challenge_run();
challenge_PI_run();
challenge_PI_run();
//printf("Internal state: %lld\n", l_result);
challenge_any_one();
challenge_run();
challenge_PI_any_one();
challenge_PI_run();
return 0;
}
......
......@@ -14,11 +14,11 @@ void challenge_RI_pow(long long *a, long long *b, long long *res)
int main()
{
challenge_initStates();
challenge_run();
challenge_run();
challenge_PI_run();
challenge_PI_run();
//printf("Internal state: %lld\n", l_result);
challenge_any_one();
challenge_run();
challenge_PI_any_one();
challenge_PI_run();
return 0;
}
......
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
void orchestrator_RI_telemetry(void *_){}
void orchestrator_RI_S_SET_GNC_LV_SIM_CONTEXT_FOR_NEXT_MAJOR_CYCLE(void *_){}
void orchestrator_RI_Scheduler(void *_){}
void orchestrator_RI_VESAT_Simulation_Step(void *_){}
void orchestrator_RI_plot(void *_) {}
void orchestrator_RI_S_JUMP_TO_NEXT_MAJOR_CYCLE() {}
void orchestrator_RI_S_GET_GNC_LV_SIM_INPUTS_FOR_NEXT_MAJOR_CYCLE(void *_){}
int main()
{
printf("[C Code] Running test\n");
adainit();
orchestrator_initStates();
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include "dataview-uniq.h"
extern void adainit();
extern void controlflow_run();
void controlflow_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
if (!*res) {
fprintf(stderr, "%.*s\n", (int)msg->nCount, msg->arr);
exit(1);
}
}
void controlflow_RI_fail(asn1SccCharString *msg) {
fprintf(stderr, "%.*s\n", (int)msg->nCount, msg->arr);
exit(1);
}
int main() {
adainit();
controlflow_initStates();
controlflow_PI_run();
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include "dataview-uniq.h"
extern void run();
void controlflow_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
if (!*res) {
printf("%.*s\n", (int)msg->nCount, msg->arr);
exit(1);
}
}
void controlflow_RI_fail(asn1SccCharString *msg) {
printf("%.*s\n", (int)msg->nCount, msg->arr);
exit(1);
}
int main() {
controlflow_initStates();
controlflow_PI_run();
return 0;
}
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
void orchestrator_RI_telemetry(void *_){}
void orchestrator_RI_S_SET_GNC_LV_SIM_CONTEXT_FOR_NEXT_MAJOR_CYCLE(void *_){}
void orchestrator_RI_Scheduler(void *_){}
void orchestrator_RI_VESAT_Simulation_Step(void *_){}
void orchestrator_RI_plot(void *_) {}
void orchestrator_RI_S_JUMP_TO_NEXT_MAJOR_CYCLE() {}
void orchestrator_RI_S_GET_GNC_LV_SIM_INPUTS_FOR_NEXT_MAJOR_CYCLE(void *_){}
int main()
{
printf("[C Code] Running test\n");
adainit();
orchestrator_initStates();
return 0;
}
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
extern void og_PI_go(asn1SccMy_OctStr *);
void og_RI_rezult (asn1SccMy_OctStr *val)
{
printf("[C] got something]\n");
}
int main() {
asn1SccMy_OctStr toto;
adainit();
og_initStates();
og_PI_go(&toto);
return 0;
}
#include <math.h>
#include <stdio.h>
/* Ada code external interface */
extern void challenge_PI_run();
extern void challenge_PI_go_off();
extern int adainit();
//extern long long l_result;
/* Provide code called by the Ada state machine as external procedure */
void challenge_RI_pow(long long *a, long long *b, long long *res)
{
*res = (long long)pow((double)*a, (double)*b);
}
int main()
{
adainit();
challenge_initStates();
challenge_PI_run();
challenge_PI_go_off();
return 0;
}
int main()
{
// CInit();
challenge_initStates();
challenge_PI_run();
challenge_PI_go_off();
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include "dataview-uniq.h"
extern void adainit();
extern void expressions_PI_run();
void expressions_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
if (!*res) {
fprintf(stderr, "%.*s\n", (int)msg->nCount, msg->arr);
exit(1);
}
}
int main() {
adainit();
expressions_initStates();
expressions_PI_run();
return 0;
}
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
extern void og_PI_go(asn1SccMy_OctStr *);
void og_RI_rezult (asn1SccMy_OctStr *val)
{
printf("[C] got something\n");
}
int main() {
asn1SccMy_OctStr toto = test_string; // send "hello"
adainit();
og_initStates();
og_PI_go(&toto); // will move state to Running
og_PI_go(&toto); // will display ay
og_PI_go(&toto); // will display ay
return 0;
}
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
void orchestrator_RI_telemetry(void *_){}
void orchestrator_RI_S_SET_GNC_LV_SIM_CONTEXT_FOR_NEXT_MAJOR_CYCLE(void *_){}
void orchestrator_RI_Scheduler(void *_){}
void orchestrator_RI_VESAT_Simulation_Step(void *_){}
void orchestrator_RI_plot(void *_) {}
void orchestrator_RI_S_JUMP_TO_NEXT_MAJOR_CYCLE() {}
void orchestrator_RI_S_GET_GNC_LV_SIM_INPUTS_FOR_NEXT_MAJOR_CYCLE(void *_){}
int main()
{
printf("[C Code] Running test\n");
adainit();
orchestrator_initStates();
return 0;
}
......@@ -3,7 +3,7 @@
#include "dataview-uniq.h"
extern void expressions_initStates();
extern void expressions_run();
extern void expressions_PI_run();
void expressions_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
if (!*res) {
......@@ -14,6 +14,6 @@ void expressions_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
int main() {
expressions_initStates();
expressions_run();
expressions_PI_run();
return 0;
}
......@@ -15,7 +15,7 @@ void expressions_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
int main() {
expressions_initStates();
expressions_run();
expressions_PI_run();
return 0;
}
#include <math.h>
#include <stdio.h>
/* Ada code external interface */
extern void challenge_run();
extern void challenge_go_off();
extern int adainit();
//extern long long l_result;
/* Provide code called by the Ada state machine as external procedure */
void challenge_RI_pow(long long *a, long long *b, long long *res)
{
*res = (long long)pow((double)*a, (double)*b);
}
int main()
{
adainit();
challenge_initStates();
challenge_run();
challenge_go_off();
return 0;
}
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
void orchestrator_RI_telemetry(void *_){}
void orchestrator_RI_S_SET_GNC_LV_SIM_CONTEXT_FOR_NEXT_MAJOR_CYCLE(void *_){}
void orchestrator_RI_Scheduler(void *_){}
void orchestrator_RI_VESAT_Simulation_Step(void *_){}
void orchestrator_RI_plot(void *_) {}
void orchestrator_RI_S_JUMP_TO_NEXT_MAJOR_CYCLE() {}
void orchestrator_RI_S_GET_GNC_LV_SIM_INPUTS_FOR_NEXT_MAJOR_CYCLE(void *_){}
int main()
{
printf("[C Code] Running test\n");
adainit();
orchestrator_initStates();
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include "dataview-uniq.h"
extern void adainit();
extern void operators_PI_run();
void operators_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
if (!*res) {
fprintf(stderr, "%.*s\n", (int)msg->nCount, msg->arr);
exit(1);
}
}
int main() {
adainit();
operators_initStates();
operators_PI_run();
return 0;
}
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
int main() {
adainit();
og_initStates();
return 0;
}
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
void orchestrator_RI_peek_list(void *_) {}
void orchestrator_RI_peek_fixed(void *_) {}
void orchestrator_RI_telemetry(void *_){}
extern char *fixed_value();
//extern int fixed_size();
int main()
{
char * toto;
int size;
int i;
printf("[C Code] Running test\n");
adainit();
orchestrator_initStates();
toto = fixed_value();
// size = fixed_size();
// printf("Size=%d\n", size);
// for (i = 0; i<size; i++) printf("%d", toto[i]);
printf("\n");
return 0;
}
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
int main() {
adainit();
og_initStates();
return 0;
}
#include <math.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include "dataview-uniq.h"
extern void adainit();
extern void myfunction_PI_start_something(asn1SccT_Int32 *);
extern void myfunction_PI_mytimer();
void myfunction_RI_result_data(long long *val)
{
printf("[C] result_data: %lld\n", *val);
}
int main()
{
asn1SccT_Int32 test = 5;
printf("[C Code] Running test\n");
adainit();
myfunction_initStates();
myfunction_PI_start_something(&test);
return 0;
}
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
extern void og_PI_go(asn1SccMy_OctStr *);
void og_RI_rezult (asn1SccMy_OctStr *val)
{
printf("[C] got something]\n");
}
int main() {
asn1SccMy_OctStr toto = test_string; // send "hello"
adainit();
og_initStates();
og_PI_go(&toto); // will move state to Running
og_PI_go(&toto); // will display ay
og_PI_go(&toto); // will display ay
return 0;
}
#include "dataview-uniq.h"
void og_RI_rezult (asn1SccMy_OctStr *val)
{
printf("[C] got something]\n");
}
int main() {
asn1SccMy_OctStr toto;
og_initStates();
og_PI_go(&toto);
return 0;
}
#include <math.h>
#include <stdio.h>
/* Ada code external interface */
extern void challenge_PI_run();
extern void challenge_PI_any_one();
extern int adainit();
//extern long long l_result;
/* Provide code called by the Ada state machine as external procedure */
void challenge_RI_pow(long long *a, long long *b, long long *res)
{
*res = (long long)pow((double)*a, (double)*b);
}
int main()
{
adainit();
challenge_initStates();
challenge_PI_run();
challenge_PI_run();
//printf("Internal state: %lld\n", l_result);
challenge_PI_any_one();
challenge_PI_run();
return 0;
}
extern void adainit();
int main() {
adainit();
og_initStates();
return 0;
}
int main() {
og_initStates();
og_run();
return 0;
}
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
void orchestrator_RI_telemetry(void *_){}
void orchestrator_RI_S_SET_GNC_LV_SIM_CONTEXT_FOR_NEXT_MAJOR_CYCLE(void *_){}
void orchestrator_RI_Scheduler(void *_){}
void orchestrator_RI_VESAT_Simulation_Step(void *_){}
void orchestrator_RI_plot(void *_) {}
void orchestrator_RI_S_JUMP_TO_NEXT_MAJOR_CYCLE() {}
void orchestrator_RI_S_GET_GNC_LV_SIM_INPUTS_FOR_NEXT_MAJOR_CYCLE(void *_){}
int main()
{
printf("[C Code] Running test\n");
adainit();
orchestrator_initStates();
return 0;
}
#include <math.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include "dataview-uniq.h"
extern void adainit();
extern void myfunction_PI_start_something(asn1SccT_Int32 *);
extern void myfunction_PI_myTimer();
volatile sig_atomic_t keep_going = 1;
void myfunction_RI_result_data(long long *val)
{
printf("[C] result_data: %lld\n", *val);
}
void myfunction_RI_SET_myTimer(asn1SccT_Int32 *val)
{
printf("[C] SET MyTimer: %lld\n", *val);
alarm(((int)*val) / 1000);
}
void timer_expired()
{
myfunction_PI_myTimer();
keep_going = 0;
}
void myfunction_RI_RESET_myTimer()
{
printf("RESET MyTimer\n");
}
int main()
{
asn1SccT_Int32 test = 5;
signal(SIGALRM, timer_expired);
printf("[C Code] Running test\n");
adainit();
myfunction_initStates();
myfunction_PI_start_something(&test);
while (keep_going);
return 0;
}
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
extern void adainit();
void orchestrator_RI_VESAT_one_step(asn1SccT_GNC_LV_SIM_INPUTS *inp)
{
printf("[C Code] Received T_GNC_LV_SIM_INPUTS\n");
}
int main()
{
printf("[C Code] Running test\n");
adainit();
orchestrator_initStates();
return 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