Last change
on this file since 87 was
83,
checked in by rosiere, 16 years ago
|
Add component : Context_State (manage miss prediction, exception , decod_enable, synchronisation instruction ...)
|
File size:
1.2 KB
|
Rev | Line | |
---|
[76] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/@DIRECTORY/SelfTest/include/test.h" |
---|
| 9 | |
---|
| 10 | #define NB_PARAMS 0 |
---|
| 11 | |
---|
| 12 | void usage (int argc, char * argv[]) |
---|
| 13 | { |
---|
| 14 | err (_("<Usage> %s name_instance list_params.\n"),argv[0]); |
---|
| 15 | err (_("list_params is :\n")); |
---|
[83] | 16 | err (_(" * ()\n")); |
---|
[76] | 17 | |
---|
| 18 | exit (1); |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | #ifndef SYSTEMC |
---|
| 22 | int main (int argc, char * argv[]) |
---|
| 23 | #else |
---|
| 24 | int sc_main (int argc, char * argv[]) |
---|
| 25 | #endif |
---|
| 26 | { |
---|
[78] | 27 | if (argc != static_cast<int>(2+NB_PARAMS)) |
---|
[76] | 28 | usage (argc, argv); |
---|
| 29 | |
---|
[78] | 30 | uint32_t x = 1; |
---|
[76] | 31 | |
---|
[78] | 32 | string name = argv[x++]; |
---|
[76] | 33 | |
---|
[78] | 34 | int _return = EXIT_SUCCESS; |
---|
[76] | 35 | try |
---|
| 36 | { |
---|
| 37 | morpheo::behavioural::@NAMESPACE_USE::Parameters * param = new morpheo::behavioural::@NAMESPACE_USE::Parameters |
---|
[83] | 38 | ( |
---|
[76] | 39 | ); |
---|
| 40 | |
---|
| 41 | msg(_("%s"),param->print(1).c_str()); |
---|
| 42 | |
---|
| 43 | test (name,param); |
---|
| 44 | } |
---|
| 45 | catch (morpheo::ErrorMorpheo & error) |
---|
| 46 | { |
---|
[78] | 47 | msg (_("<%s> :\n%s"),name.c_str(), error.what ()); |
---|
| 48 | _return = EXIT_FAILURE; |
---|
[76] | 49 | } |
---|
[83] | 50 | |
---|
| 51 | try |
---|
[76] | 52 | { |
---|
[83] | 53 | if (_return == EXIT_SUCCESS) |
---|
| 54 | TEST_OK("@COMPONENT : no error"); |
---|
| 55 | else |
---|
| 56 | TEST_KO("@COMPONENT : a lot of error"); |
---|
| 57 | } |
---|
| 58 | catch (morpheo::ErrorMorpheo & error) |
---|
| 59 | { |
---|
| 60 | msg (_("<%s> :\n%s"),name.c_str(), error.what ()); |
---|
[78] | 61 | _return = EXIT_FAILURE; |
---|
[76] | 62 | } |
---|
| 63 | |
---|
[78] | 64 | return (_return); |
---|
[76] | 65 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.