Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestDateTime.cpp File Reference
#include "LangInfo.h"
#include "XBDateTime.h"
#include "guilib/LocalizeStrings.h"
#include "interfaces/legacy/ModuleXbmc.h"
#include <array>
#include <iostream>
#include <gtest/gtest.h>

Classes

class  TestDateTime
 

Functions

 TEST_F (TestDateTime, DateTimeOperators)
 
 TEST_F (TestDateTime, FileTimeOperators)
 
 TEST_F (TestDateTime, SystemTimeOperators)
 
 TEST_F (TestDateTime, TimeTOperators)
 
 TEST_F (TestDateTime, TmOperators)
 
 TEST_F (TestDateTime, GetCurrentDateTime)
 
 TEST_F (TestDateTime, GetUTCDateTime)
 
 TEST_F (TestDateTime, MonthStringToMonthNum)
 
 TEST_F (TestDateTime, DISABLED_SetFromDateString)
 
 TEST_F (TestDateTime, SetFromDBDate)
 
 EXPECT_TRUE (dateTime1.SetFromDBTime("12:34"))
 
 EXPECT_EQ (dateTime1.GetHour(), 12)
 
 EXPECT_EQ (dateTime1.GetMinute(), 34)
 
 EXPECT_EQ (dateTime1.GetSecond(), 0)
 
 EXPECT_TRUE (dateTime2.SetFromDBTime("12:34:56"))
 
 EXPECT_EQ (dateTime2.GetHour(), 12)
 
 EXPECT_EQ (dateTime2.GetMinute(), 34)
 
 EXPECT_EQ (dateTime2.GetSecond(), 56)
 
 TEST_F (TestDateTime, SetFromDBDateTime)
 
 TEST_F (TestDateTime, SetFromW3CDate)
 
 TEST_F (TestDateTime, SetFromW3CDateTime)
 
 TEST_F (TestDateTime, SetFromUTCDateTime)
 
 TEST_F (TestDateTime, SetFromRFC1123DateTime)
 
 TEST_F (TestDateTime, SetDateTime)
 
 TEST_F (TestDateTime, GetAsStrings)
 
 TEST_F (TestDateTime, DISABLED_GetAsStringsWithBias)
 
 TEST_F (TestDateTime, GetAsLocalized)
 
 TEST_F (TestDateTime, GetAsSystemTime)
 
 TEST_F (TestDateTime, GetAsTime)
 
 TEST_F (TestDateTime, GetAsTm)
 
 TEST_F (TestDateTime, DISABLED_GetAsTimeStamp)
 
 TEST_F (TestDateTime, GetAsUTCDateTime)
 
dateTime SetDateTime (1991, 05, 14, 12, 34, 56)
 
dateTime Reset ()
 
 EXPECT_EQ (dateTime.GetYear(), 1601)
 
 EXPECT_EQ (dateTime.GetMonth(), 1)
 
 EXPECT_EQ (dateTime.GetHour(), 0)
 

Variables

CDateTime dateTime2
 

Function Documentation

◆ EXPECT_EQ() [1/9]

EXPECT_EQ ( dateTime. GetHour(),
0  )

◆ EXPECT_EQ() [2/9]

EXPECT_EQ ( dateTime. GetMonth(),
1  )

◆ EXPECT_EQ() [3/9]

EXPECT_EQ ( dateTime. GetYear(),
1601  )

◆ EXPECT_EQ() [4/9]

EXPECT_EQ ( dateTime1. GetHour(),
12  )

◆ EXPECT_EQ() [5/9]

EXPECT_EQ ( dateTime1. GetMinute(),
34  )

◆ EXPECT_EQ() [6/9]

EXPECT_EQ ( dateTime1. GetSecond(),
0  )

◆ EXPECT_EQ() [7/9]

EXPECT_EQ ( dateTime2. GetHour(),
12  )

◆ EXPECT_EQ() [8/9]

EXPECT_EQ ( dateTime2. GetMinute(),
34  )

◆ EXPECT_EQ() [9/9]

EXPECT_EQ ( dateTime2. GetSecond(),
56  )

◆ EXPECT_TRUE() [1/2]

EXPECT_TRUE ( dateTime1. SetFromDBTime"12:34")

◆ EXPECT_TRUE() [2/2]

EXPECT_TRUE ( dateTime2. SetFromDBTime"12:34:56")

◆ Reset()

dateTime Reset ( )

◆ SetDateTime()

dateTime SetDateTime ( 1991 ,
05 ,
14 ,
12 ,
34 ,
56  )

◆ TEST_F() [1/24]

TEST_F ( TestDateTime ,
DateTimeOperators  )

◆ TEST_F() [2/24]

TEST_F ( TestDateTime ,
DISABLED_GetAsStringsWithBias  )

◆ TEST_F() [3/24]

TEST_F ( TestDateTime ,
DISABLED_GetAsTimeStamp  )

◆ TEST_F() [4/24]

TEST_F ( TestDateTime ,
DISABLED_SetFromDateString  )

◆ TEST_F() [5/24]

TEST_F ( TestDateTime ,
FileTimeOperators  )

◆ TEST_F() [6/24]

TEST_F ( TestDateTime ,
GetAsLocalized  )

◆ TEST_F() [7/24]

TEST_F ( TestDateTime ,
GetAsStrings  )

◆ TEST_F() [8/24]

TEST_F ( TestDateTime ,
GetAsSystemTime  )

◆ TEST_F() [9/24]

TEST_F ( TestDateTime ,
GetAsTime  )

◆ TEST_F() [10/24]

TEST_F ( TestDateTime ,
GetAsTm  )

◆ TEST_F() [11/24]

TEST_F ( TestDateTime ,
GetAsUTCDateTime  )

◆ TEST_F() [12/24]

TEST_F ( TestDateTime ,
GetCurrentDateTime  )

◆ TEST_F() [13/24]

TEST_F ( TestDateTime ,
GetUTCDateTime  )

◆ TEST_F() [14/24]

TEST_F ( TestDateTime ,
MonthStringToMonthNum  )

◆ TEST_F() [15/24]

TEST_F ( TestDateTime ,
SetDateTime  )

◆ TEST_F() [16/24]

TEST_F ( TestDateTime ,
SetFromDBDate  )

◆ TEST_F() [17/24]

TEST_F ( TestDateTime ,
SetFromDBDateTime  )

◆ TEST_F() [18/24]

TEST_F ( TestDateTime ,
SetFromRFC1123DateTime  )

◆ TEST_F() [19/24]

TEST_F ( TestDateTime ,
SetFromUTCDateTime  )

◆ TEST_F() [20/24]

TEST_F ( TestDateTime ,
SetFromW3CDate  )

◆ TEST_F() [21/24]

TEST_F ( TestDateTime ,
SetFromW3CDateTime  )

◆ TEST_F() [22/24]

TEST_F ( TestDateTime ,
SystemTimeOperators  )

◆ TEST_F() [23/24]

TEST_F ( TestDateTime ,
TimeTOperators  )

◆ TEST_F() [24/24]

TEST_F ( TestDateTime ,
TmOperators  )

Variable Documentation

◆ dateTime2

CDateTime dateTime2