1 | /* |
---|
2 | * $Id: test.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | * Test |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Configuration/SelfTest/include/test.h" |
---|
10 | #include "Behavioural/Custom/include/Custom_default.h" |
---|
11 | #include "Behavioural/Custom/include/Custom_example.h" |
---|
12 | |
---|
13 | void test (string name) |
---|
14 | { |
---|
15 | morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void) = &(morpheo::behavioural::custom::default_get_custom_information); |
---|
16 | |
---|
17 | cout << "------------------------------------------------------" << endl; |
---|
18 | |
---|
19 | Simulator * simulator1 = new Simulator ("../../../Files/Morpheo.sim"); |
---|
20 | |
---|
21 | //cout << *simulator1 << endl; |
---|
22 | |
---|
23 | simulator1->toFile("data_out"); |
---|
24 | |
---|
25 | cout << "------------------------------------------------------" << endl; |
---|
26 | |
---|
27 | Generator * generator1 = new Generator ("../../../Files/Morpheo.gen"); |
---|
28 | |
---|
29 | //cout << *generator1 << endl; |
---|
30 | |
---|
31 | generator1->toFile("data_out"); |
---|
32 | |
---|
33 | cout << "------------------------------------------------------" << endl; |
---|
34 | |
---|
35 | Instance * instance1 = new Instance ("../../../Files/Instance_min.cfg", |
---|
36 | generator1, |
---|
37 | _get_custom_information |
---|
38 | ); |
---|
39 | |
---|
40 | // cout << *instance1 << endl; |
---|
41 | |
---|
42 | instance1->toFile("data_out"); |
---|
43 | |
---|
44 | cout << "------------------------------------------------------" << endl; |
---|
45 | |
---|
46 | Configuration * configuration1 = new Configuration("../../../Files/Morpheo.sim", |
---|
47 | "../../../Files/Morpheo.gen", |
---|
48 | "../../../Files/Instance_min.cfg", |
---|
49 | _get_custom_information); |
---|
50 | |
---|
51 | //cout << *configuration1 << endl; |
---|
52 | |
---|
53 | configuration1->toFile("data_out"); |
---|
54 | |
---|
55 | { |
---|
56 | cout << "------------------------------------------------------" << endl; |
---|
57 | |
---|
58 | Instance * instance = new Instance ("../../../Files/Instance_scalar_1.cfg", |
---|
59 | generator1, |
---|
60 | _get_custom_information |
---|
61 | ); |
---|
62 | instance->toFile("data_out"); |
---|
63 | |
---|
64 | delete instance; |
---|
65 | } |
---|
66 | |
---|
67 | { |
---|
68 | cout << "------------------------------------------------------" << endl; |
---|
69 | |
---|
70 | Instance * instance = new Instance ("../../../Files/Instance_scalar_2.cfg", |
---|
71 | generator1, |
---|
72 | _get_custom_information |
---|
73 | ); |
---|
74 | instance->toFile("data_out"); |
---|
75 | |
---|
76 | delete instance; |
---|
77 | } |
---|
78 | |
---|
79 | delete configuration1; |
---|
80 | delete instance1; |
---|
81 | delete generator1; |
---|
82 | delete simulator1; |
---|
83 | |
---|
84 | |
---|
85 | } |
---|