[arrayfire] 30/84: Added noImageIOTests() to relevant tests

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Jan 4 23:22:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository arrayfire.

commit 5bd550f6dcf424ffeff3ac9877334677a8d7dd77
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Wed Dec 16 13:43:19 2015 -0500

    Added noImageIOTests() to relevant tests
---
 test/bilateral.cpp    |  1 +
 test/fast.cpp         |  2 ++
 test/gloh_nonfree.cpp |  2 ++
 test/harris.cpp       |  2 ++
 test/homography.cpp   |  3 +++
 test/imageio.cpp      | 12 ++++++++++++
 test/meanshift.cpp    |  2 ++
 test/medfilt.cpp      |  1 +
 test/morph.cpp        |  2 ++
 test/orb.cpp          |  2 ++
 test/sift_nonfree.cpp |  2 ++
 test/susan.cpp        |  1 +
 12 files changed, 32 insertions(+)

diff --git a/test/bilateral.cpp b/test/bilateral.cpp
index 08b7a4c..f0825e4 100644
--- a/test/bilateral.cpp
+++ b/test/bilateral.cpp
@@ -24,6 +24,7 @@ template<typename T, bool isColor>
 void bilateralTest(string pTestFile)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>       inDims;
     vector<string>    inFiles;
diff --git a/test/fast.cpp b/test/fast.cpp
index c13d6da..a114a8f 100644
--- a/test/fast.cpp
+++ b/test/fast.cpp
@@ -72,6 +72,7 @@ template<typename T>
 void fastTest(string pTestFile, bool nonmax)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>        inDims;
     vector<string>     inFiles;
@@ -175,6 +176,7 @@ void fastTest(string pTestFile, bool nonmax)
 TEST(FloatFAST, CPP)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>        inDims;
     vector<string>     inFiles;
diff --git a/test/gloh_nonfree.cpp b/test/gloh_nonfree.cpp
index 2346269..a65d52a 100644
--- a/test/gloh_nonfree.cpp
+++ b/test/gloh_nonfree.cpp
@@ -159,6 +159,7 @@ void glohTest(string pTestFile)
 {
 #ifdef AF_BUILD_SIFT
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>           inDims;
     vector<string>         inFiles;
@@ -270,6 +271,7 @@ TEST(GLOH, CPP)
 {
 #ifdef AF_BUILD_SIFT
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>           inDims;
     vector<string>         inFiles;
diff --git a/test/harris.cpp b/test/harris.cpp
index b964e89..276a3e3 100644
--- a/test/harris.cpp
+++ b/test/harris.cpp
@@ -63,6 +63,7 @@ template<typename T>
 void harrisTest(string pTestFile, float sigma, unsigned block_size)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>        inDims;
     vector<string>     inFiles;
@@ -164,6 +165,7 @@ void harrisTest(string pTestFile, float sigma, unsigned block_size)
 TEST(FloatHarris, CPP)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>        inDims;
     vector<string>     inFiles;
diff --git a/test/homography.cpp b/test/homography.cpp
index 7be9e07..662b7a2 100644
--- a/test/homography.cpp
+++ b/test/homography.cpp
@@ -59,6 +59,7 @@ void homographyTest(string pTestFile, const af_homography_type htype,
                     const bool rotate, const float size_ratio)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>           inDims;
     vector<string>         inFiles;
@@ -216,6 +217,8 @@ void homographyTest(string pTestFile, const af_homography_type htype,
 //
 TEST(Homography, CPP)
 {
+    if (noImageIOTests()) return;
+
     vector<dim4>           inDims;
     vector<string>         inFiles;
     vector<vector<float> > gold;
diff --git a/test/imageio.cpp b/test/imageio.cpp
index a826bb8..d19aac3 100644
--- a/test/imageio.cpp
+++ b/test/imageio.cpp
@@ -41,6 +41,7 @@ TYPED_TEST_CASE(ImageIO, TestTypes);
 void loadImageTest(string pTestFile, string pImageFile, const bool isColor)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     vector<af::dim4> numDims;
 
@@ -98,6 +99,8 @@ TYPED_TEST(ImageIO, ColorSeq)
 
 void loadimageArgsTest(string pImageFile, const bool isColor, af_err err)
 {
+    if (noImageIOTests()) return;
+
     af_array imgArray = 0;
 
     ASSERT_EQ(err, af_load_image(&imgArray, pImageFile.c_str(), isColor));
@@ -119,6 +122,7 @@ TYPED_TEST(ImageIO,InvalidArgsWrongExt)
 TEST(ImageIO, CPP)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     vector<af::dim4> numDims;
 
@@ -145,6 +149,8 @@ TEST(ImageIO, CPP)
 
 TEST(ImageIO, SavePNGCPP) {
 
+    if (noImageIOTests()) return;
+
     af::array input(10, 10, 3, f32);
 
     input(af::span, af::span, af::span) = 0;
@@ -161,6 +167,8 @@ TEST(ImageIO, SavePNGCPP) {
 
 TEST(ImageIO, SaveBMPCPP) {
 
+    if (noImageIOTests()) return;
+
     af::array input(10, 10, 3, f32);
 
     input(af::span, af::span, af::span) = 0;
@@ -178,6 +186,7 @@ TEST(ImageIO, SaveBMPCPP) {
 TEST(ImageMem, SaveMemPNG)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     af::array img = af::loadImage(string(TEST_DIR"/imageio/color_seq.png").c_str(), true);
 
@@ -193,6 +202,7 @@ TEST(ImageMem, SaveMemPNG)
 TEST(ImageMem, SaveMemJPG1)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     af::array img = af::loadImage(string(TEST_DIR"/imageio/color_seq.png").c_str(), false);
     af::saveImage("color_seq1.jpg", img);
@@ -210,6 +220,7 @@ TEST(ImageMem, SaveMemJPG1)
 TEST(ImageMem, SaveMemJPG3)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     af::array img = af::loadImage(string(TEST_DIR"/imageio/color_seq.png").c_str(), true);
     af::saveImage("color_seq3.jpg", img);
@@ -227,6 +238,7 @@ TEST(ImageMem, SaveMemJPG3)
 TEST(ImageMem, SaveMemBMP)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     af::array img = af::loadImage(string(TEST_DIR"/imageio/color_rand.png").c_str(), true);
 
diff --git a/test/meanshift.cpp b/test/meanshift.cpp
index 7363350..0116a5e 100644
--- a/test/meanshift.cpp
+++ b/test/meanshift.cpp
@@ -51,6 +51,7 @@ template<typename T, bool isColor>
 void meanshiftTest(string pTestFile)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>       inDims;
     vector<string>    inFiles;
@@ -120,6 +121,7 @@ IMAGE_TESTS(double)
 TEST(Meanshift, Color_CPP)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>       inDims;
     vector<string>    inFiles;
diff --git a/test/medfilt.cpp b/test/medfilt.cpp
index 99dd0b6..9b45908 100644
--- a/test/medfilt.cpp
+++ b/test/medfilt.cpp
@@ -91,6 +91,7 @@ template<typename T,bool isColor>
 void medfiltImageTest(string pTestFile, dim_t w_len, dim_t w_wid)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     using af::dim4;
 
diff --git a/test/morph.cpp b/test/morph.cpp
index d73ca9b..d9c5282 100644
--- a/test/morph.cpp
+++ b/test/morph.cpp
@@ -121,6 +121,7 @@ template<typename T, bool isDilation, bool isColor>
 void morphImageTest(string pTestFile)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     using af::dim4;
 
@@ -341,6 +342,7 @@ template<typename T, bool isDilation, bool isColor>
 void cppMorphImageTest(string pTestFile)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     using af::dim4;
 
diff --git a/test/orb.cpp b/test/orb.cpp
index 4b3c158..5259366 100644
--- a/test/orb.cpp
+++ b/test/orb.cpp
@@ -144,6 +144,7 @@ template<typename T>
 void orbTest(string pTestFile)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>             inDims;
     vector<string>           inFiles;
@@ -253,6 +254,7 @@ void orbTest(string pTestFile)
 TEST(ORB, CPP)
 {
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>             inDims;
     vector<string>           inFiles;
diff --git a/test/sift_nonfree.cpp b/test/sift_nonfree.cpp
index 28c597c..cf1683f 100644
--- a/test/sift_nonfree.cpp
+++ b/test/sift_nonfree.cpp
@@ -159,6 +159,7 @@ void siftTest(string pTestFile, unsigned nLayers, float contrastThr, float edgeT
 {
 #ifdef AF_BUILD_SIFT
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>           inDims;
     vector<string>         inFiles;
@@ -276,6 +277,7 @@ TEST(SIFT, CPP)
 {
 #ifdef AF_BUILD_SIFT
     if (noDoubleTests<float>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>           inDims;
     vector<string>         inFiles;
diff --git a/test/susan.cpp b/test/susan.cpp
index 01ed228..df806c0 100644
--- a/test/susan.cpp
+++ b/test/susan.cpp
@@ -63,6 +63,7 @@ template<typename T>
 void susanTest(string pTestFile, float t, float g)
 {
     if (noDoubleTests<T>()) return;
+    if (noImageIOTests()) return;
 
     vector<dim4>        inDims;
     vector<string>     inFiles;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list