[gnome-js-common] Tests: conditionally compile seed test only if we have seed



commit c80dea2d8f84bd859cdc933185243ef7e5d772d1
Author: Tim Horton <hortont424 gmail com>
Date:   Wed May 27 06:00:34 2009 -0400

    Tests: conditionally compile seed test only if we have seed
---
 configure.ac        |    3 +++
 tests/Makefile.am   |   10 ++++++++--
 tests/everything.js |    2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 923f08a..594d412 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,9 @@ fi
 AM_CONDITIONAL(HAVE_SEED, test "x$want_seed" = "xyes")
 AM_CONDITIONAL(HAVE_GJS, test "x$want_gjs" = "xyes")
 
+AC_SUBST(HAVE_SEED)
+AC_SUBST(HAVE_GJS)
+
 AC_OUTPUT([
 Makefile
 po/Makefile.in
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 28af374..448a800 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,12 @@
 ## Process this file with automake to produce Makefile.in
 
-bin_PROGRAMS = run-tests-seed
+check_PROGRAMS = 
+TESTS = 
+
+if HAVE_SEED
+
+check_PROGRAMS += run-tests-seed
+TESTS += run-tests-seed
 
 run_tests_seed_SOURCES = run-tests-seed.c
 
@@ -11,4 +17,4 @@ run_tests_seed_CFLAGS = \
 run_tests_seed_LDFLAGS = \
 	$(SEED_LIBS)
 
-TESTS = run-tests-seed
+endif
diff --git a/tests/everything.js b/tests/everything.js
index a229f96..1db1ced 100644
--- a/tests/everything.js
+++ b/tests/everything.js
@@ -24,7 +24,7 @@ assert(test_ssize(12) == 12);
 assert(test_size(143) == 143);
 assert(test_float(-1853.5) == -1853.5);
 assert(test_double(-134543853.12334) == -134543853.12334);
-//assert(test_timet(1853) == 1853);
+assert(test_timet(1853).getTime() == 1853*1000);
 assert(test_gtype(8) == 8);
 
 var filenames = test_filename_return(); 



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