r3903 - in trunk/bse: . tests



Author: stw
Date: 2006-09-27 05:29:42 -0400 (Wed, 27 Sep 2006)
New Revision: 3903

Modified:
   trunk/bse/ChangeLog
   trunk/bse/tests/testresampler.cc
Log:
Wed Sep 27 11:27:35 2006  Stefan Westerfeld  <stefan space twc de>

	* tests/testresampler.cc: Allow using --fpu instead of
	--bse-force-fpu, because that means less typing.
	In the accuracy test, print out the threshold given by the user, if
	any (that way, it becomes easier to validate the "safety margin"
	between the specified and the actual threshold)


Modified: trunk/bse/ChangeLog
===================================================================
--- trunk/bse/ChangeLog	2006-09-26 16:57:42 UTC (rev 3902)
+++ trunk/bse/ChangeLog	2006-09-27 09:29:42 UTC (rev 3903)
@@ -1,3 +1,11 @@
+Wed Sep 27 11:27:35 2006  Stefan Westerfeld  <stefan space twc de>
+
+	* tests/testresampler.cc: Allow using --fpu instead of
+	--bse-force-fpu, because that means less typing.
+	In the accuracy test, print out the threshold given by the user, if
+	any (that way, it becomes easier to validate the "safety margin"
+	between the specified and the actual threshold)
+
 Tue Sep 26 10:34:03 2006  Stefan Westerfeld  <stefan space twc de>
 
 	* bseblockutils.cc bseblockutils.hh: Provide hook for testing the

Modified: trunk/bse/tests/testresampler.cc
===================================================================
--- trunk/bse/tests/testresampler.cc	2006-09-26 16:57:42 UTC (rev 3902)
+++ trunk/bse/tests/testresampler.cc	2006-09-27 09:29:42 UTC (rev 3903)
@@ -104,7 +104,7 @@
   printf ("  --oversample          perform --up and --down\n");
   printf ("  --precision=<bits>    choose resampling filter for <bits> precision\n");
   printf ("                        supported precisions: 8, 12, 16, 20, 24 [%d]\n", static_cast<int> (options.precision));
-  printf ("  --bse-force-fpu       disable loading of SSE or similarly optimized code\n");
+  printf ("  --fpu                 disables loading of SSE or similarly optimized code\n");
   printf ("\n");
   printf ("Options:\n");
   printf (" --frequency=<freq>     use <freq> as sine test frequency [%f]\n", options.frequency);
@@ -486,6 +486,8 @@
       if (TEST == TEST_ACCURACY)
 	{
 	  printf ("#   max difference between correct and computed output: %f = %f dB\n", max_diff, max_diff_db);
+	  if (max_diff_db < 0)
+	    printf ("#                             (threshold given by user: %f dB)\n", options.max_threshold_db);
 	  g_assert (max_diff_db < options.max_threshold_db);
 	}
     }
@@ -561,6 +563,13 @@
 int
 main (int argc, char **argv)
 {
+  /* preprocess args: allow using --fpu instead of --bse-force-fpu,
+   * because its a really common use case for the resampler test
+   */
+  for (int i = 0; i < argc; i++)
+    if (strcmp (argv[i], "--fpu") == 0)
+      argv[i] = g_strdup ("--bse-force-fpu"); /* leak, but we don't care */
+
   /* load plugins */
   BirnetInitValue config[] = {
 	{ "load-core-plugins", "1" },




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