Files
compute-runtime/opencl/test/unit_test/mocks/mock_io_functions.h
Zbigniew Zdanowicz f096d71a75 Add diagnostic mode to direct submission
Related-To: NEO-4338

Change-Id: Ibcdc1b6a1762827337e4ff5364a972702130195a
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2020-04-02 17:50:59 +02:00

35 lines
691 B
C++

/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/utilities/io_functions.h"
#include <cstdint>
namespace NEO {
namespace IoFunctions {
extern uint32_t mockFopenCalled;
extern uint32_t mockVfptrinfCalled;
extern uint32_t mockFcloseCalled;
inline FILE *mockFopen(const char *filename, const char *mode) {
mockFopenCalled++;
return reinterpret_cast<FILE *>(0x40);
}
inline int mockVfptrinf(FILE *stream, const char *format, va_list arg) {
mockVfptrinfCalled++;
return 0x10;
}
inline int mockFclose(FILE *stream) {
mockFcloseCalled++;
return 0;
}
} // namespace IoFunctions
} // namespace NEO