[gnome-js-common] Remove gjs tester for now, until I take some time to make it work



commit 9a8b5519e75bc96c62e1d02cdc34de4ab60f06f5
Author: Robert Carr <racarr svn gnome org>
Date:   Thu May 28 18:41:51 2009 -0400

    Remove gjs tester for now, until I take some time to make it work
---
 tests/Makefile.am     |   15 ---------
 tests/run-tests-gjs.c |   78 -------------------------------------------------
 2 files changed, 0 insertions(+), 93 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index f04d2bc..934f6e8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,18 +19,3 @@ run_tests_seed_LDFLAGS = \
 
 endif
 
-if HAVE_GJS
-
-check_PROGRAMS += run-tests-gjs
-TESTS += run-tests-gjs
-
-run_tests_gjs_SOURCES = run-tests-gjs.c run-tests.c
-
-run_tests_gjs_CFLAGS = \
-	-Wall \
-	$(GJS_CFLAGS)
-
-run_tests_gjs_LDFLAGS = \
-	$(GJS_LIBS)
-
-endif
diff --git a/tests/run-tests-gjs.c b/tests/run-tests-gjs.c
deleted file mode 100644
index 7a763b3..0000000
--- a/tests/run-tests-gjs.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- 
- */
-
-#include <glib.h>
-#include <gjs/gjs.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-gboolean initialized = FALSE;
-extern gboolean failure_flag;
-
-/*SeedValue js_assert(SeedContext ctx,
-                    SeedObject function,
-                    SeedObject this_object,
-                    size_t argument_count,
-                    const SeedValue arguments[],
-                    SeedException * exception)
-{
-	if(!seed_value_to_boolean(ctx, arguments[0], NULL))
-		seed_make_exception(ctx, exception, "AssertionError", "Assertion failed");
-}*/
-
-static JSBool js_assert(JSContext *context,
-                        JSObject * obj,
-                        uintN argc,
-                        jsval * argv,
-                        jsval * retval)
-{
-    gboolean success;
-
-    if(!JSVAL_TO_BOOLEAN(argv[0]))
-    {
-        gjs_throw(context, "Assertion failed");
-        return JS_FALSE;
-    }
-
-    return JS_TRUE;
-}
-
-gboolean test_exec(gchar * filename)
-{
-	gchar * buffer;
-	GError *error = NULL;
-	gboolean success;
-	int code;
-	char *search_path[1];
-    search_path[0] = NULL;
-    GjsContext * context;
-	
-	if(!initialized)
-	{
-		gjs_crash_after_timeout(60*7); /* give the unit tests 7 minutes to complete */
-		gjs_init_sleep_on_crash();
-		
-		g_type_init();
-		initialized = TRUE;
-	}
-
-	context = gjs_context_new_with_search_path(search_path);
-	
-	if (!JS_DefineFunction(context, JS_GetGlobalObject(context),
-                           "assert",
-                           js_assert,
-                           1, GJS_MODULE_PROP_FLAGS))
-        return FALSE;
-    
-	success = gjs_context_eval_file(context, filename, &code, &error);
-	
-	if (!success)
-	{
-		g_error("%s", error->message);
-		return FALSE;
-	}
-	
-	return TRUE;
-}
-



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