#include <assert.h>
#include <string.h>
+#include "libpspp/compiler.h"
#include "math/decimal.h"
#include <limits.h>
#include <float.h>
This function is used purely for testing, and need not and is not intended
to be efficient.
*/
-char *
+static char *
canonicalise_string (const char *s)
{
- char *out;
+ char *out = NULL;
char *dot = NULL;
bool negative = false;
char *p;
/* Tests both the decimal_to_string function, and the decimal_input_from_string
function */
-void
+static void
test_run (const char *input)
{
struct decimal test;
}
-void
+static void
test_can (const char *in, const char *soll)
{
char *ist = canonicalise_string (in);
}
-void
+#if 0
+static void
dump_scale (const struct decimal *low, const struct decimal *interval, int n_ticks)
{
int i;
decimal_add (&tick, interval);
}
}
+#endif
-void
+static void
test_ceil (double x)
{
struct decimal dx;
assert (act == expected);
}
-void
+static void
test_floor (double x)
{
struct decimal dx;
}
-void
+static void
test_addition (const struct decimal *one_, const struct decimal *two)
{
struct decimal one = *one_;
- double d1 = decimal_to_double (&one);
- double d2 = decimal_to_double (two);
decimal_add (&one, two);
}
-void
+static void
test_multiplication (const struct decimal *d, int m)
{
char b1[256];
int
-main (int argc, char **argv)
+main (int argc UNUSED, char **argv UNUSED)
{
/* Test that our canonicalise function works for all corner cases we
can think of. */