Last change
on this file since 100 was
100,
checked in by rosiere, 15 years ago
|
1) Bug fix (Operation, Instruction)
2) Modif Return Address Stack
3) Add Soft Test
4) Add Soc Test
|
-
Property svn:keywords set to
Id
|
File size:
1.4 KB
|
Line | |
---|
1 | /* |
---|
2 | * $Id: main.cpp 100 2009-01-08 13:06:27Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Generic/Queue/SelfTest/include/test.h" |
---|
9 | |
---|
10 | #define NB_PARAMS 3 |
---|
11 | |
---|
12 | void usage (int argc, char * argv[]) |
---|
13 | { |
---|
14 | cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl |
---|
15 | << "list_params is :" << endl |
---|
16 | << " - size_queue (uint32_t)" << endl |
---|
17 | << " - size_data (uint32_t)" << endl |
---|
18 | << " - nb_port_slot (uint32_t)" << endl |
---|
19 | << "" << endl; |
---|
20 | |
---|
21 | for (int i=0; i<argc; i++) |
---|
22 | cerr << argv[i] << " "; |
---|
23 | cerr << endl; |
---|
24 | |
---|
25 | exit (1); |
---|
26 | } |
---|
27 | |
---|
28 | #ifndef SYSTEMC |
---|
29 | int main (int argc, char * argv[]) |
---|
30 | #else |
---|
31 | int sc_main (int argc, char * argv[]) |
---|
32 | #endif |
---|
33 | { |
---|
34 | if (argc != 2+NB_PARAMS) |
---|
35 | usage (argc, argv); |
---|
36 | |
---|
37 | uint32_t x = 1; |
---|
38 | |
---|
39 | const string name = argv[x++]; |
---|
40 | const uint32_t size_queue = atoi(argv[x++]); |
---|
41 | const uint32_t size_data = atoi(argv[x++]); |
---|
42 | const uint32_t nb_port_slot = atoi(argv[x++]); |
---|
43 | |
---|
44 | try |
---|
45 | { |
---|
46 | morpheo::behavioural::generic::queue::Parameters * param = new morpheo::behavioural::generic::queue::Parameters |
---|
47 | (size_queue, |
---|
48 | size_data , |
---|
49 | nb_port_slot |
---|
50 | ); |
---|
51 | |
---|
52 | cout << param->print(1); |
---|
53 | |
---|
54 | test (name,param); |
---|
55 | } |
---|
56 | catch (morpheo::ErrorMorpheo & error) |
---|
57 | { |
---|
58 | cout << "<" << name << "> : " << error.what (); |
---|
59 | exit (EXIT_FAILURE); |
---|
60 | } |
---|
61 | catch (...) |
---|
62 | { |
---|
63 | cerr << "<" << name << "> : This test must generate a error" << endl; |
---|
64 | exit (EXIT_FAILURE); |
---|
65 | } |
---|
66 | |
---|
67 | return (EXIT_SUCCESS); |
---|
68 | } |
---|
69 | |
---|
Note: See
TracBrowser
for help on using the repository browser.