Changeset 262e250 in rtems
- Timestamp:
- 12/05/13 16:27:14 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 8ed1a54c
- Parents:
- 98b9a3b
- git-author:
- Chirayu Desai <cdesai@…> (12/05/13 16:27:14)
- git-committer:
- Gedare Bloom <gedare@…> (12/05/13 16:46:04)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/sptests/sp2038/init.c
r98b9a3b r262e250 190 190 }; 191 191 192 static const rtems_time_of_day problem_2100 = { 193 .year = 2100, 194 .month = 2, 195 .day = 28, 196 .hour = 0, 197 .minute = 0, 198 .second = 0 199 }; 200 201 static const rtems_time_of_day problem_2100_2 = { 202 .year = 2100, 203 .month = 2, 204 .day = 29, 205 .hour = 0, 206 .minute = 0, 207 .second = 0 208 }; 209 192 210 static void test_tod_to_seconds(void) 193 211 { … … 252 270 } 253 271 272 static void test_leap_year(void) 273 { 274 bool test_status; 275 const rtems_time_of_day *problem = &problem_2100; 276 const rtems_time_of_day *problem2 = &problem_2100_2; 277 // 2100 is not a leap year, so it should have 28 days 278 test_status = _TOD_Validate(problem); 279 rtems_test_assert(test_status == true); 280 test_status = _TOD_Validate(problem2); 281 rtems_test_assert(test_status == false); 282 } 283 284 254 285 rtems_task Init(rtems_task_argument argument) 255 286 { … … 258 289 test_tod_to_seconds(); 259 290 test_problem_year(); 291 test_leap_year(); 260 292 261 293 puts("*** END OF TEST 2038 ***");
Note: See TracChangeset
for help on using the changeset viewer.