21 lines
467 B
C++
21 lines
467 B
C++
//
|
|
// Created by dongwenzhe on 2023/3/16.
|
|
//
|
|
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
|
#include "hardware.h"
|
|
#include "doctest.h"
|
|
|
|
TEST_SUITE("Hardware functions") {
|
|
TEST_CASE("CPU") {
|
|
PCPU_INFO cpuInfo;
|
|
memset(&cpuInfo, 0, sizeof(PCPU_INFO));
|
|
|
|
cpu_watch_init();
|
|
|
|
get_cpu_info(cpuInfo);
|
|
CHECK_NE(cpuInfo->nCores, 0);
|
|
CHECK_NE(cpuInfo->cpuUsed, 0);
|
|
CHECK_NE(cpuInfo->cpuCoreDesc.cpuName, nullptr);
|
|
}
|
|
}
|