aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-11-14 16:23:20 +0100
committerThomas White <taw@physics.org>2014-11-14 16:23:20 +0100
commitd545f4f23c7bb31b016ea5935dfd10c4e761b5ac (patch)
tree4c2c2d595a40be09ff5d49d32fc0addba4cdfd71 /tests
parentd5fab594831e7884eb2dcf395995ec6d12a9cbfd (diff)
pattern_sim: Better error trapping
Diffstat (limited to 'tests')
-rw-r--r--tests/gpu_sim_check.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/gpu_sim_check.c b/tests/gpu_sim_check.c
index 677999ab..dbe59ce2 100644
--- a/tests/gpu_sim_check.c
+++ b/tests/gpu_sim_check.c
@@ -163,7 +163,9 @@ int main(int argc, char *argv[])
gpu_image.spectrum = generate_tophat(&gpu_image);
start = get_hires_seconds();
- get_diffraction_gpu(gctx, &gpu_image, 8, 8, 8, cell, 1);
+ if ( get_diffraction_gpu(gctx, &gpu_image, 8, 8, 8, cell, 1) ) {
+ return 1;
+ }
end = get_hires_seconds();
gpu_time = end - start;