-
Notifications
You must be signed in to change notification settings - Fork 2
/
t1.i
60 lines (47 loc) · 1.06 KB
/
t1.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%module t1
%{
extern int ftst();
extern void HpInit(void);
extern void HpTerm(void);
extern char* fw(char* cmd);
extern void atexit_cleanup(void);
extern char* dTsName();
extern int test_throw_error();
/* #include "TMsim.h" */
%}
%init %{
HpInit();
printf("HpInit() -- welcome to ntk\n");
atexit( atexit_cleanup );
%}
extern int dErr;
extern char dErrMsg[];
extern int ftst();
extern void HpInit(void);
extern void HpTerm(void);
extern char* fw(char* cmd);
%except(python) {
$function
if( dErr ) {
dErr = 0;
PyErr_SetString( PyExc_RuntimeError, dErrMsg );
return NULL;
}
}
/*
extern char* dTsName();
extern int test_throw_error();
extern int TMsim_start_suite(char* testSuiteName,
unsigned short lev_eq,
unsigned short lev_spec,
unsigned short lev_set,
unsigned short tim_eq,
unsigned short tim_spec,
unsigned short tim_set,
char* testFunction,
char* label );
extern int TMsim_log_value(char* testName,
double value,
char* PF);
extern int TMsim_end_suite(char* PF) ;
*/