Skip to content

Commit

Permalink
Add an assert to expect_equal() to make sure people send in reasonabl…
Browse files Browse the repository at this point in the history
…e widths and heights.
  • Loading branch information
sesse committed Jan 16, 2013
1 parent 5fea9e6 commit 616432c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test_util.cpp
Expand Up @@ -185,6 +185,9 @@ void expect_equal(const float *ref, const float *result, unsigned width, unsigne

void expect_equal(const unsigned char *ref, const unsigned char *result, unsigned width, unsigned height, unsigned largest_difference_limit, float rms_limit)
{
assert(width > 0);
assert(height > 0);

float *ref_float = new float[width * height];
float *result_float = new float[width * height];

Expand Down

0 comments on commit 616432c

Please sign in to comment.