File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,11 @@ static PyObject*
49
49
test_pytime_monotonic (PyObject * Py_UNUSED (self ), PyObject * Py_UNUSED (args ))
50
50
{
51
51
PyTime_t t ;
52
- if (PyTime_Monotonic (& t ) < 0 ) {
52
+ int res = PyTime_Monotonic (& t );
53
+ if (res < 0 ) {
53
54
return NULL ;
54
55
}
56
+ assert (res == 0 );
55
57
return pytime_as_float (t );
56
58
}
57
59
@@ -60,9 +62,11 @@ static PyObject*
60
62
test_pytime_perf_counter (PyObject * Py_UNUSED (self ), PyObject * Py_UNUSED (args ))
61
63
{
62
64
PyTime_t t ;
63
- if (PyTime_PerfCounter (& t ) < 0 ) {
65
+ int res = PyTime_PerfCounter (& t );
66
+ if (res < 0 ) {
64
67
return NULL ;
65
68
}
69
+ assert (res == 0 );
66
70
return pytime_as_float (t );
67
71
}
68
72
@@ -71,10 +75,11 @@ static PyObject*
71
75
test_pytime_time (PyObject * Py_UNUSED (self ), PyObject * Py_UNUSED (args ))
72
76
{
73
77
PyTime_t t ;
74
- if ( PyTime_Time (& t ) < 0 ) {
75
- printf ( "ERR! %d\n" , ( int ) t );
78
+ int res = PyTime_Time (& t );
79
+ if ( res < 0 ) {
76
80
return NULL ;
77
81
}
82
+ assert (res == 0 );
78
83
return pytime_as_float (t );
79
84
}
80
85
You can’t perform that action at this time.
0 commit comments