@@ -69,12 +69,12 @@ struct timetest {
69
69
};
70
70
71
71
UNITTEST_START
72
+ {
73
+ struct timeval now ;
74
+ long timeout ;
75
+ unsigned int i ;
72
76
73
- struct timeval now ;
74
- long timeout ;
75
- unsigned int i ;
76
-
77
- const struct timetest run [] = {
77
+ const struct timetest run [] = {
78
78
/* both timeouts set, not connecting */
79
79
{BASE + 4 , 0 , 10000 , 8000 , FALSE, 6000 , "6 seconds should be left" },
80
80
{BASE + 4 , 990000 , 10000 , 8000 , FALSE, 5010 , "5010 ms should be left" },
@@ -126,21 +126,20 @@ const struct timetest run[] = {
126
126
/* both timeouts set, connecting, connect timeout the longer one */
127
127
{BASE + 4 , 0 , 10000 , 12000 , TRUE, 6000 , "6 seconds should be left" },
128
128
129
- };
130
-
131
- /* this is the pretended start time of the transfer */
132
- data -> progress .t_startsingle .tv_sec = BASE ;
133
- data -> progress .t_startsingle .tv_usec = 0 ;
134
- data -> progress .t_startop .tv_sec = BASE ;
135
- data -> progress .t_startop .tv_usec = 0 ;
136
-
137
- for (i = 0 ; i < sizeof (run )/sizeof (run [0 ]); i ++ ) {
138
- NOW (run [i ].now_s , run [i ].now_us );
139
- TIMEOUTS (run [i ].timeout_ms , run [i ].connecttimeout_ms );
140
- timeout = Curl_timeleft (data , & now , run [i ].connecting );
141
- if (timeout != run [i ].result )
142
- fail (run [i ].comment );
129
+ };
130
+
131
+ /* this is the pretended start time of the transfer */
132
+ data -> progress .t_startsingle .tv_sec = BASE ;
133
+ data -> progress .t_startsingle .tv_usec = 0 ;
134
+ data -> progress .t_startop .tv_sec = BASE ;
135
+ data -> progress .t_startop .tv_usec = 0 ;
136
+
137
+ for (i = 0 ; i < sizeof (run )/sizeof (run [0 ]); i ++ ) {
138
+ NOW (run [i ].now_s , run [i ].now_us );
139
+ TIMEOUTS (run [i ].timeout_ms , run [i ].connecttimeout_ms );
140
+ timeout = Curl_timeleft (data , & now , run [i ].connecting );
141
+ if (timeout != run [i ].result )
142
+ fail (run [i ].comment );
143
+ }
143
144
}
144
-
145
-
146
145
UNITTEST_STOP
0 commit comments