Get rid of threadTesting.h (#1604)

It only contains a pointer type definition for test functions that
really ought to be provided by testHarness.h.

Signed-off-by: Kévin Petit <kpet@free.fr>

Signed-off-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
Kévin Petit
2023-01-14 15:18:27 +00:00
committed by GitHub
parent 896f43615d
commit 1eeb10296f
17 changed files with 12 additions and 49 deletions

View File

@@ -49,9 +49,11 @@ namespace detail {
struct test_case_registration
{
test_case_registration(const std::string& name, const basefn ptr)
test_case_registration(const std::string& name,
const test_function_pointer ptr)
{
::autotest::test_suite::global_test_suite().add(test_definition({ptr, strdup(name.c_str())}));
::autotest::test_suite::global_test_suite().add(
test_definition({ ptr, strdup(name.c_str()) }));
}
};

View File

@@ -34,7 +34,6 @@
#include "harness/errorHelpers.h"
#include "harness/kernelHelpers.h"
#include "harness/threadTesting.h"
#include "harness/typeWrappers.h"
#include "harness/conversions.h"
#include "harness/mt19937.h"

View File

@@ -37,7 +37,6 @@
#include "harness/errorHelpers.h"
#include "harness/kernelHelpers.h"
#include "harness/threadTesting.h"
#include "harness/typeWrappers.h"
#include "harness/conversions.h"
#include "harness/mt19937.h"

View File

@@ -22,7 +22,6 @@
#include <cassert>
#include <stdexcept>
#include <vector>
#include "threadTesting.h"
#include "errorHelpers.h"
#include "kernelHelpers.h"
#include "fpcontrol.h"

View File

@@ -16,7 +16,6 @@
#ifndef _testHarness_h
#define _testHarness_h
#include "threadTesting.h"
#include "clImageHelper.h"
#include <string>
#include <sstream>
@@ -67,9 +66,12 @@ Version get_device_cl_version(cl_device_id device);
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
typedef int (*test_function_pointer)(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements);
typedef struct test_definition
{
basefn func;
test_function_pointer func;
const char *name;
Version min_version;
} test_definition;

View File

@@ -1,28 +0,0 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef _threadTesting_h
#define _threadTesting_h
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/opencl.h>
#endif
typedef int (*basefn)(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements);
#endif // _threadTesting_h