Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestCPUInfo.cpp File Reference
#include "ServiceBroker.h"
#include "settings/AdvancedSettings.h"
#include "settings/SettingsComponent.h"
#include "utils/CPUInfo.h"
#include "utils/Temperature.h"
#include "utils/XTimeUtils.h"
#include <gtest/gtest.h>

Classes

struct  TestCPUInfo
 

Functions

 TEST_F (TestCPUInfo, GetUsedPercentage)
 
 TEST_F (TestCPUInfo, GetCPUCount)
 
 TEST_F (TestCPUInfo, GetCPUFrequency)
 
 EXPECT_TRUE (CServiceBroker::GetCPUInfo() ->GetTemperature(t))
 
 EXPECT_TRUE (t.IsValid())
 
 EXPECT_EQ (t.ToCelsius(), 50)
 
 TEST_F (TestCPUInfo, CoreInfo)
 
 TEST_F (TestCPUInfo, GetCoresUsageString)
 
 TEST_F (TestCPUInfo, GetCPUFeatures)
 

Variables

CTemperature t
 

Function Documentation

◆ EXPECT_EQ()

EXPECT_EQ ( t. ToCelsius(),
50  )

◆ EXPECT_TRUE() [1/2]

EXPECT_TRUE ( CServiceBroker::GetCPUInfo() ->GetTemperature(t) )

◆ EXPECT_TRUE() [2/2]

EXPECT_TRUE ( t. IsValid())

◆ TEST_F() [1/6]

TEST_F ( TestCPUInfo ,
CoreInfo  )

◆ TEST_F() [2/6]

TEST_F ( TestCPUInfo ,
GetCoresUsageString  )

◆ TEST_F() [3/6]

TEST_F ( TestCPUInfo ,
GetCPUCount  )

◆ TEST_F() [4/6]

TEST_F ( TestCPUInfo ,
GetCPUFeatures  )

◆ TEST_F() [5/6]

TEST_F ( TestCPUInfo ,
GetCPUFrequency  )

◆ TEST_F() [6/6]

TEST_F ( TestCPUInfo ,
GetUsedPercentage  )

Variable Documentation

◆ t

Initial value:
{
CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_cpuTempCmd = "echo '50 c'"
static std::shared_ptr< CSettingsComponent > GetSettingsComponent()
Definition ServiceBroker.cpp:166