test_time_conversion.c File Reference


Detailed Description

unit tests for time_conversion.c/.h

Author:
Glenn D. MacGougan (GDM)
Date:
2007-11-29
Since:
2007-11-26
"LICENSE INFORMATION"
Copyright (c) 2007, refer to 'author' doxygen tags
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file test_time_conversion.c.

#include <stdio.h>
#include "Basic.h"
#include "time_conversion.h"
#include "constants.h"

Go to the source code of this file.

Functions

int init_suite_TIMECONV (void)
 The suite initialization function.
int clean_suite_TIMECONV (void)
 The suite cleanup function.
void test_TIMECONV_GetJulianDateFromGPSTime (void)
 Test TIMECONV_GetJulianDateFromGPSTime().
void test_TIMECONV_GetJulianDateFromUTCTime (void)
 Test TIMECONV_GetJulianDateFromUTCTime().
void test_TIMECONV_GetGPSTimeFromJulianDate (void)
 Test TIMECONV_GetGPSTimeFromJulianDate().
void test_TIMECONV_GetUTCTimeFromJulianDate (void)
 Test TIMECONV_GetUTCTimeFromJulianDate().
void test_TIMECONV_GetGPSTimeFromUTCTime (void)
 Test TIMECONV_GetGPSTimeFromUTCTime().
void test_TIMECONV_GetUTCTimeFromGPSTime (void)
 Test TIMECONV_GetUTCTimeFromGPSTime().
void test_TIMECONV_DetermineUTCOffset (void)
 Test TIMECONV_DetermineUTCOffset().
void test_TIMECONV_GetNumberOfDaysInMonth (void)
 Test TIMECONV_GetNumberOfDaysInMonth().
void test_TIMECONV_IsALeapYear (void)
 Test TIMECONV_IsALeapYear().
void test_TIMECONV_GetDayOfYear (void)
 Test TIMECONV_GetDayOfYear().
void test_TIMECONV_GetGPSTimeFromYearAndDayOfYear (void)
 Test TIMECONV_GetGPSTimeFromYearAndDayOfYear().


Function Documentation

int clean_suite_TIMECONV ( void   ) 

The suite cleanup function.

Returns:
Returns zero on success, non-zero otherwise.

Definition at line 47 of file test_time_conversion.c.

int init_suite_TIMECONV ( void   ) 

The suite initialization function.

Returns:
Returns zero on success, non-zero otherwise.

Definition at line 42 of file test_time_conversion.c.

void test_TIMECONV_DetermineUTCOffset ( void   ) 

Test TIMECONV_DetermineUTCOffset().

6 jan 1980 0, Jan 06, 1980, 00:00:00.0, 2444244.5000
1 jul 1981 1, Jul 01, 1981, 00:00:00.0, 2444786.5000
1 jul 1982 2, Jul 01, 1982, 00:00:00.0, 2445151.5000
1 jul 1983 3, Jul 01, 1983, 00:00:00.0, 2445516.5000
1 jul 1985 4, Jul 01, 1985, 00:00:00.0, 2446247.5000
1 jan 1988 5, Jan 01, 1988, 00:00:00.0, 2447161.5000
1 jan 1990 6, Jan 01, 1990, 00:00:00.0, 2447892.5000
1 jan 1991 7, Jan 01, 1991, 00:00:00.0, 2448257.5000
1 jul 1992 8, Jul 01, 1992, 00:00:00.0, 2448804.5000
1 jul 1993 9, Jul 01, 1993, 00:00:00.0, 2449169.5000
1 jul 1994 10, Jul 01, 1994, 00:00:00.0, 2449534.5000
1 jan 1996 11, Jan 01, 1996, 00:00:00.0, 2450083.5000
1 jul 1997 12, Jul 01, 1997, 00:00:00.0, 2450630.5000
1 jan 1999 13, Jan 01, 1999, 00:00:00.0, 2451179.5000

Definition at line 330 of file test_time_conversion.c.

void test_TIMECONV_GetDayOfYear ( void   ) 

Test TIMECONV_GetDayOfYear().

Definition at line 494 of file test_time_conversion.c.

void test_TIMECONV_GetGPSTimeFromJulianDate ( void   ) 

Test TIMECONV_GetGPSTimeFromJulianDate().

Definition at line 143 of file test_time_conversion.c.

void test_TIMECONV_GetGPSTimeFromUTCTime ( void   ) 

Test TIMECONV_GetGPSTimeFromUTCTime().

Definition at line 227 of file test_time_conversion.c.

void test_TIMECONV_GetGPSTimeFromYearAndDayOfYear ( void   ) 

Test TIMECONV_GetGPSTimeFromYearAndDayOfYear().

Definition at line 517 of file test_time_conversion.c.

void test_TIMECONV_GetJulianDateFromGPSTime ( void   ) 

Test TIMECONV_GetJulianDateFromGPSTime().

Definition at line 53 of file test_time_conversion.c.

void test_TIMECONV_GetJulianDateFromUTCTime ( void   ) 

Test TIMECONV_GetJulianDateFromUTCTime().

Definition at line 98 of file test_time_conversion.c.

void test_TIMECONV_GetNumberOfDaysInMonth ( void   ) 

Test TIMECONV_GetNumberOfDaysInMonth().

Definition at line 452 of file test_time_conversion.c.

void test_TIMECONV_GetUTCTimeFromGPSTime ( void   ) 

Test TIMECONV_GetUTCTimeFromGPSTime().

Definition at line 278 of file test_time_conversion.c.

void test_TIMECONV_GetUTCTimeFromJulianDate ( void   ) 

Test TIMECONV_GetUTCTimeFromJulianDate().

Definition at line 176 of file test_time_conversion.c.

void test_TIMECONV_IsALeapYear ( void   ) 

Test TIMECONV_IsALeapYear().

Definition at line 485 of file test_time_conversion.c.