[beast: 11/24] TESTS: use Rapicorn's printerr()



commit 8840c3d4e169970cf22c8d38f945068457280a56
Author: Tim Janik <timj gnu org>
Date:   Tue Sep 22 22:21:13 2015 +0200

    TESTS: use Rapicorn's printerr()

 tests/bse/filtertest.cc |   20 ++++++++++----------
 tests/testresampler.cc  |   14 +++++++-------
 2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/tests/bse/filtertest.cc b/tests/bse/filtertest.cc
index 0c37b00..871c801 100644
--- a/tests/bse/filtertest.cc
+++ b/tests/bse/filtertest.cc
@@ -221,8 +221,8 @@ private:
       }
     if (!(resp > min_resp_db - DB_EPSILON) || !(resp < max_resp_db + DB_EPSILON))
       {
-       g_printerr ("\n*** check_response_db: computed response at frequency %f is %f\n", freq, resp);
-       g_printerr ("*** check_response_db: but should be in interval [%f..%f]\n", min_resp_db, max_resp_db);
+       printerr ("\n*** check_response_db: computed response at frequency %f is %f\n", freq, resp);
+       printerr ("*** check_response_db: but should be in interval [%f..%f]\n", min_resp_db, max_resp_db);
       }
     TASSERT (resp > min_resp_db - DB_EPSILON);
     TASSERT (resp < max_resp_db + DB_EPSILON);
@@ -317,19 +317,19 @@ public:
     FILE *data_file = fopen (data_filename.c_str(), "w");
     if (!data_file)
       {
-       g_printerr ("\ncan't open gnuplot datafile '%s': %s\n",
+       printerr ("\ncan't open gnuplot datafile '%s': %s\n",
                    data_filename.c_str(), strerror (errno));
        return false;
       }
     FILE *gp_file = fopen (gp_filename.c_str(), "w");
     if (!gp_file)
       {
-       g_printerr ("\ncan't open gnuplot scriptfile '%s': %s\n",
+       printerr ("\ncan't open gnuplot scriptfile '%s': %s\n",
                    gp_filename.c_str(), strerror (errno));
        fclose (data_file);
        return false;
       }
-    g_printerr ("creating gnuplot files '%s', '%s'... ", gp_filename.c_str(), data_filename.c_str());
+    printerr ("creating gnuplot files '%s', '%s'... ", gp_filename.c_str(), data_filename.c_str());
 
     for (double f = 0; f < FS/2; f += delta_f)
       {
@@ -360,7 +360,7 @@ public:
     fclose (gp_file);
     fclose (data_file);
 
-    g_printerr ("ok.\n");
+    printerr ("ok.\n");
     return 0;
   }
 };
@@ -480,7 +480,7 @@ setup_all_filter_tests (vector<FilterTest>& filter_tests)
 void
 check_computed_response (const vector<FilterTest>& filter_tests)
 {
-  g_printerr ("---> checking computed filter responses:\n");
+  printerr ("---> checking computed filter responses:\n");
   for (vector<FilterTest>::const_iterator fi = filter_tests.begin(); fi != filter_tests.end(); fi++)
     fi->perform_checks (FilterTest::TEST_COMPUTED_RESPONSE, 10000);
 }
@@ -488,7 +488,7 @@ check_computed_response (const vector<FilterTest>& filter_tests)
 void
 check_scanned_response (const vector<FilterTest>& filter_tests)
 {
-  g_printerr ("---> checking scanned filter responses:\n");
+  printerr ("---> checking scanned filter responses:\n");
   for (vector<FilterTest>::const_iterator fi = filter_tests.begin(); fi != filter_tests.end(); fi++)
     fi->perform_checks (FilterTest::TEST_SCANNED_RESPONSE, 67);  /* prime number scan points */
 }
@@ -508,8 +508,8 @@ main (int     argc,
     {
       int a;
       for (a = 1; a < argc; a++)
-       g_printerr ("%s: unknown extra arg: %s\n", options.program_name.c_str(), argv[a]);
-      g_printerr ("%s: use the --help option for help.\n", options.program_name.c_str());
+       printerr ("%s: unknown extra arg: %s\n", options.program_name.c_str(), argv[a]);
+      printerr ("%s: use the --help option for help.\n", options.program_name.c_str());
       return 1;
     }
 
diff --git a/tests/testresampler.cc b/tests/testresampler.cc
index b717006..76aa118 100644
--- a/tests/testresampler.cc
+++ b/tests/testresampler.cc
@@ -213,13 +213,13 @@ Options::parse (int   *argc_p,
          if ((block_size & 1) == 1)
            {
              block_size++;
-             g_printerr ("testresampler: block size needs to be even (fixed: using %d as block size)\n", 
block_size);
+             printerr ("testresampler: block size needs to be even (fixed: using %d as block size)\n", 
block_size);
            }
 
          if (block_size < 2)
            {
              block_size = 2;
-             g_printerr ("testresampler: block size needs to be at least 2 (fixed: using %d as block 
size)\n", block_size);
+             printerr ("testresampler: block size needs to be at least 2 (fixed: using %d as block size)\n", 
block_size);
            }
        }
       else if (check_arg (argc, argv, &i, "--precision", &opt_arg))
@@ -233,7 +233,7 @@ Options::parse (int   *argc_p,
            case 20:
            case 24: precision = static_cast<BseResampler2Precision> (p);
              break;
-           default: g_printerr ("testresampler: unsupported precision: %d\n", p);
+           default: printerr ("testresampler: unsupported precision: %d\n", p);
                     exit (1);
            }
        }
@@ -256,7 +256,7 @@ Options::parse (int   *argc_p,
            }
          if (freq_inc < 1)
            {
-             g_printerr ("testresampler: invalid frequency scanning specification\n");
+             printerr ("testresampler: invalid frequency scanning specification\n");
              exit (1);
            }
          g_free (oa);
@@ -525,7 +525,7 @@ perform_test()
          const guint FFT_SIZE = 16384;
          if (error_spectrum_error.size() < FFT_SIZE)
            {
-             g_printerr ("too few values for computing error spectrum, increase block size\n");
+             printerr ("too few values for computing error spectrum, increase block size\n");
            }
          else
            {
@@ -667,7 +667,7 @@ main (int argc, char **argv)
        test_type = TEST_FILTER_IMPL;
       else
        {
-         g_printerr ("testresampler: unknown mode command: '%s'\n", command.c_str());
+         printerr ("testresampler: unknown mode command: '%s'\n", command.c_str());
          exit (1);
        }
     }
@@ -678,7 +678,7 @@ main (int argc, char **argv)
     }
   else
     {
-      g_printerr ("testresampler: too many arguments\n");
+      printerr ("testresampler: too many arguments\n");
       exit (1);
     }
   return perform_test();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]