[88] | 1 | /* |
---|
| 2 | * $Id: test.cpp 108 2009-02-12 11:55:06Z 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" |
---|
[97] | 12 | #include "Common/include/Time.h" |
---|
[88] | 13 | |
---|
| 14 | void test (string name) |
---|
| 15 | { |
---|
[97] | 16 | Time * timing = new Time (false); |
---|
| 17 | |
---|
[88] | 18 | morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void) = &(morpheo::behavioural::custom::default_get_custom_information); |
---|
| 19 | |
---|
| 20 | cout << "------------------------------------------------------" << endl; |
---|
| 21 | |
---|
| 22 | Simulator * simulator1 = new Simulator ("../../../Files/Morpheo.sim"); |
---|
| 23 | |
---|
| 24 | //cout << *simulator1 << endl; |
---|
| 25 | |
---|
| 26 | simulator1->toFile("data_out"); |
---|
| 27 | |
---|
| 28 | cout << "------------------------------------------------------" << endl; |
---|
| 29 | |
---|
| 30 | Generator * generator1 = new Generator ("../../../Files/Morpheo.gen"); |
---|
| 31 | |
---|
| 32 | //cout << *generator1 << endl; |
---|
| 33 | |
---|
| 34 | generator1->toFile("data_out"); |
---|
| 35 | |
---|
| 36 | cout << "------------------------------------------------------" << endl; |
---|
| 37 | |
---|
| 38 | Instance * instance1 = new Instance ("../../../Files/Instance_min.cfg", |
---|
| 39 | generator1, |
---|
| 40 | _get_custom_information |
---|
| 41 | ); |
---|
| 42 | |
---|
| 43 | // cout << *instance1 << endl; |
---|
| 44 | |
---|
| 45 | instance1->toFile("data_out"); |
---|
| 46 | |
---|
| 47 | cout << "------------------------------------------------------" << endl; |
---|
| 48 | |
---|
| 49 | Configuration * configuration1 = new Configuration("../../../Files/Morpheo.sim", |
---|
| 50 | "../../../Files/Morpheo.gen", |
---|
| 51 | "../../../Files/Instance_min.cfg", |
---|
| 52 | _get_custom_information); |
---|
| 53 | |
---|
| 54 | //cout << *configuration1 << endl; |
---|
| 55 | |
---|
| 56 | configuration1->toFile("data_out"); |
---|
| 57 | |
---|
| 58 | { |
---|
| 59 | cout << "------------------------------------------------------" << endl; |
---|
| 60 | |
---|
[108] | 61 | Instance * instance = new Instance ("../../../Files/Instance_debug.cfg", |
---|
[88] | 62 | generator1, |
---|
| 63 | _get_custom_information |
---|
| 64 | ); |
---|
| 65 | instance->toFile("data_out"); |
---|
| 66 | |
---|
| 67 | delete instance; |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | delete configuration1; |
---|
| 72 | delete instance1; |
---|
| 73 | delete generator1; |
---|
| 74 | delete simulator1; |
---|
[97] | 75 | delete timing; |
---|
[88] | 76 | } |
---|