/* Build like so:
 * gcc test_libgda.c `pkg-config libgda-5.0 --cflags --libs`
 */

#include <libgda/libgda.h>
#include <locale.h>
#include <stdio.h>

GdaConnection* conn = NULL;


int main()
{
  gda_init();

  /* Comment this out to fix the problem: */
  setlocale (LC_ALL, "");

  const double expected = 3.49f;

  GdaNumeric* numeric = gda_numeric_new();
  gda_numeric_set_double(numeric, expected);

  const double result = gda_numeric_get_double(numeric);

  printf("expected: %f, result=%f\n", expected, result);

  return (expected == result) ? EXIT_SUCCESS : EXIT_FAILURE;
}

