Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
7d1ce809
Commit
7d1ce809
authored
Apr 23, 2015
by
Marian Triebe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/unit-test-framework'
parents
7a0cecd5
03d5c849
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
25 deletions
+7
-25
libcaf_opencl/test/opencl.cpp
libcaf_opencl/test/opencl.cpp
+7
-7
libcaf_opencl/unit_testing/CMakeLists.txt
libcaf_opencl/unit_testing/CMakeLists.txt
+0
-18
No files found.
libcaf_opencl/
unit_testing/test_
opencl.cpp
→
libcaf_opencl/
test/
opencl.cpp
View file @
7d1ce809
#define CAF_SUITE opencl
#include "caf/test/unit_test.hpp"
#include <vector>
#include <vector>
#include <iomanip>
#include <iomanip>
#include <cassert>
#include <cassert>
#include <iostream>
#include <iostream>
#include <algorithm>
#include <algorithm>
#include "../../unit_testing/test.hpp"
#include "caf/all.hpp"
#include "caf/all.hpp"
#include "caf/opencl/spawn_cl.hpp"
#include "caf/opencl/spawn_cl.hpp"
...
@@ -241,8 +242,8 @@ void test_opencl() {
...
@@ -241,8 +242,8 @@ void test_opencl() {
auto
create_error
=
program
::
create
(
kernel_source_error
);
auto
create_error
=
program
::
create
(
kernel_source_error
);
}
}
catch
(
const
std
::
exception
&
exc
)
{
catch
(
const
std
::
exception
&
exc
)
{
CAF_
PRINT
(
exc
.
what
());
CAF_
MESSAGE
(
exc
.
what
());
CAF_CHECK
_EQUAL
(
"clBuildProgram: CL_BUILD_PROGRAM_FAILURE"
,
exc
.
what
()
);
CAF_CHECK
(
strcmp
(
"clBuildProgram: CL_BUILD_PROGRAM_FAILURE"
,
exc
.
what
())
==
0
);
}
}
// test for opencl compiler flags
// test for opencl compiler flags
auto
prog5
=
program
::
create
(
kernel_source_compiler_flag
,
compiler_flag
);
auto
prog5
=
program
::
create
(
kernel_source_compiler_flag
,
compiler_flag
);
...
@@ -294,12 +295,11 @@ void test_opencl() {
...
@@ -294,12 +295,11 @@ void test_opencl() {
);
);
}
}
int
main
()
{
CAF_TEST
(
test_opencl
)
{
CAF_TEST
(
test_opencl
);
announce
<
ivec
>
(
"ivec"
);
announce
<
ivec
>
(
"ivec"
);
matrix_type
::
announce
();
matrix_type
::
announce
();
test_opencl
();
test_opencl
();
await_all_actors_done
();
await_all_actors_done
();
shutdown
();
shutdown
();
return
CAF_TEST_RESULT
();
}
}
libcaf_opencl/unit_testing/CMakeLists.txt
deleted
100644 → 0
View file @
7a0cecd5
cmake_minimum_required
(
VERSION 2.8
)
project
(
caf_unit_tests_opencl CXX
)
if
(
OpenCL_LIBRARIES
)
add_custom_target
(
opencl_unit_tests
)
include_directories
(
${
LIBCAF_INCLUDE_DIRS
}
)
macro
(
add_unit_test name
)
add_executable
(
test_
${
name
}
test_
${
name
}
.cpp ../../unit_testing/test.cpp
${
ARGN
}
)
target_link_libraries
(
test_
${
name
}
${
LD_FLAGS
}
${
LIBCAF_LIBRARIES
}
${
PTHREAD_LIBRARIES
}
${
OpenCL_LIBRARIES
}
)
add_test
(
${
name
}
${
EXECUTABLE_OUTPUT_PATH
}
/test_
${
name
}
)
add_dependencies
(
test_
${
name
}
all_unit_tests
)
endmacro
()
add_unit_test
(
opencl
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment