]> git.sesse.net Git - movit/blobdiff - test_util.cpp
A small comment fix in ColorspaceConversionEffect.
[movit] / test_util.cpp
index b466de2dfe5d765c0036c61834edd57f67952bf9..190af9559bb8fa302e0cf7bd6251f8a277ab0488 100644 (file)
@@ -1,12 +1,16 @@
-#include "init.h"
-#include "test_util.h"
+#include <assert.h>
+#include <gtest/gtest-message.h>
+#include <math.h>
+#include <stdio.h>
+#include <algorithm>
+
 #include "flat_input.h"
 #include "gtest/gtest.h"
+#include "init.h"
+#include "test_util.h"
+#include "util.h"
 
-#include <stdio.h>
-#include <math.h>
-
-#include <algorithm>
+class Input;
 
 namespace {
 
@@ -185,6 +189,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];