diff options
author | Benjamin Segovia <segovia.benjamin@gmail.com> | 2012-05-03 16:24:24 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-08-10 16:16:58 -0700 |
commit | ccd746d3af1a4778e5c145fb752ea5a739f70840 (patch) | |
tree | 0c2be48dec1047e9629210ecda488a5fa5e087f8 /utests/compiler_write_only.cpp | |
parent | 1a9bcd8ff623a0b96cb034df711e4b02bfab8c6e (diff) | |
download | beignet-ccd746d3af1a4778e5c145fb752ea5a739f70840.tar.gz |
Revamped tests to make them smaller and simpler (and more automatic to use)
Diffstat (limited to 'utests/compiler_write_only.cpp')
-rw-r--r-- | utests/compiler_write_only.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utests/compiler_write_only.cpp b/utests/compiler_write_only.cpp index b5b1afe2..f7382532 100644 --- a/utests/compiler_write_only.cpp +++ b/utests/compiler_write_only.cpp @@ -19,11 +19,10 @@ #include "utest_helper.hpp" -int -main (int argc, char *argv[]) +void compiler_write_only(void) { const size_t n = 2048; - int status = 0, i; + int status = 0; CALL (cl_test_init, "test_write_only.cl", "test_write_only", SOURCE); OCL_CREATE_BUFFER(buf[0], 0, n * sizeof(uint32_t), NULL); @@ -32,13 +31,14 @@ main (int argc, char *argv[]) locals[0] = 16; OCL_NDRANGE(1); OCL_MAP_BUFFER(0); - for (i = 0; i < n; ++i) assert(((int*)buf_data[0])[i] == i); + for (uint32_t i = 0; i < n; ++i) assert(((uint32_t*)buf_data[0])[i] == i); OCL_UNMAP_BUFFER(0); error: cl_release_buffers(); cl_report_error(status); cl_test_destroy(); - return status; } +UTEST_REGISTER(compiler_write_only); + |