source:
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp
@
122
Last change on this file since 122 was 113, checked in by , 15 years ago | |
---|---|
File size: 814 bytes |
Rev | Line | |
---|---|---|
[2] | 1 | /* |
2 | * $Id$ | |
3 | * | |
[73] | 4 | * [ Description ] |
[2] | 5 | * |
6 | */ | |
7 | ||
[113] | 8 | #include "Behavioural/@DIRECTORY/SelfTest/include/top.h" |
[2] | 9 | |
[113] | 10 | #ifndef MTI_SYSTEMC |
11 | # ifndef SYSTEMC | |
[2] | 12 | int main (int argc, char * argv[]) |
[113] | 13 | # else |
[2] | 14 | int sc_main (int argc, char * argv[]) |
[113] | 15 | # endif |
[2] | 16 | { |
[113] | 17 | int _return = EXIT_SUCCESS; |
[2] | 18 | |
[113] | 19 | try |
20 | { | |
21 | top * my_top = new top ("my_top",argc,argv); | |
[2] | 22 | |
[113] | 23 | my_top->test(); |
[62] | 24 | |
[113] | 25 | delete my_top; |
[2] | 26 | } |
27 | catch (morpheo::ErrorMorpheo & error) | |
28 | { | |
[113] | 29 | msgError(_("%s\n"),error.what ()); |
[78] | 30 | _return = EXIT_FAILURE; |
[2] | 31 | } |
[83] | 32 | |
33 | try | |
[2] | 34 | { |
[83] | 35 | if (_return == EXIT_SUCCESS) |
36 | TEST_OK("@COMPONENT : no error"); | |
37 | else | |
38 | TEST_KO("@COMPONENT : a lot of error"); | |
39 | } | |
40 | catch (morpheo::ErrorMorpheo & error) | |
41 | { | |
[113] | 42 | // msgError(_("<%s> :\n%s"),name.c_str(), error.what ()); |
[78] | 43 | _return = EXIT_FAILURE; |
[2] | 44 | } |
45 | ||
[113] | 46 | return _return; |
[2] | 47 | } |
[113] | 48 | #endif |
Note: See TracBrowser
for help on using the repository browser.