mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 17:29:14 +08:00
Cleaned up files: opencl/source/mem_obj/image.inl shared/offline_compiler/source/decoder/zebin_manipulator.h shared/source/aub_mem_dump/aub_alloc_dump.h shared/source/compiler_interface/intermediate_representations.h shared/source/helpers/blit_commands_helper_base.inl shared/source/utilities/debug_file_reader.h shared/source/utilities/software_tags.h shared/source/xe_hpc_core/hw_cmds_pvc.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
41 lines
703 B
C++
41 lines
703 B
C++
/*
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/utilities/timer_util.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
using namespace NEO;
|
|
|
|
TEST(TimerTest, WhenGettingStartEndThenEndIsAfterStart) {
|
|
|
|
Timer::setFreq();
|
|
Timer timer;
|
|
|
|
timer.start();
|
|
timer.end();
|
|
long long start = timer.getStart();
|
|
EXPECT_NE(0, start);
|
|
|
|
long long end = timer.getEnd();
|
|
EXPECT_NE(0, end);
|
|
EXPECT_GE(end, start);
|
|
}
|
|
|
|
TEST(TimerTest, WhenAssigningTimerThenStartTimeIsCopied) {
|
|
|
|
Timer::setFreq();
|
|
Timer timer1, timer2;
|
|
|
|
timer1.start();
|
|
timer1.end();
|
|
|
|
timer2 = timer1;
|
|
|
|
EXPECT_EQ(timer1.getStart(), timer2.getStart());
|
|
}
|