From 9dced96ab294e4e7700903b6a228051c6c600515 Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Thu, 18 Aug 2011 16:10:48 -0400 Subject: [PATCH] switching over to use browser-evaluate planet package --- README | 2 +- tests/test-assemble.rkt | 13 ++++++++++--- tests/test-browser-evaluate.rkt | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README b/README index 3be181d..1bd0309 100644 --- a/README +++ b/README @@ -168,7 +168,7 @@ Tests The test suite in test-all.rkt runs the test suite. You'll need to run this on a system with a web browser, as the suite will evaluate JavaScript and make sure it is producing values. A bridge module -browser-evaluate.rkt brings up a temporary web server that allows us +(planet dyoo/browser-evaluate) brings up a temporary web server that allows us to pass values between Racket and the JavaScript evaluator on the browser. diff --git a/tests/test-assemble.rkt b/tests/test-assemble.rkt index 993cdb0..6ec2026 100644 --- a/tests/test-assemble.rkt +++ b/tests/test-assemble.rkt @@ -1,6 +1,6 @@ #lang racket -(require "browser-evaluate.rkt" +(require (planet dyoo/browser-evaluate) "../js-assembler/assemble.rkt" "../js-assembler/package.rkt" "../compiler/lexical-structs.rkt" @@ -70,9 +70,16 @@ (display "var myInvoke = " op) (assemble/write-invoke a-statement op) (display ";" op) - (fprintf op - "return function(succ, fail, params) { myInvoke(MACHINE, function(v) { succ(plt.runtime.toDisplayedString(~a));}, fail, params); }" + "return function(succ, fail, params) { + var newParams = { currentDisplayer: function(MACHINE, v) { + params.currentDisplayer(v); } }; + + myInvoke(MACHINE, + function(v) { succ(plt.runtime.toDisplayedString(~a));}, + function(MACHINE, exn) { fail(exn); }, + newParams); + }" inspector) (display "})" op)))))) (define (E-many stmts (inspector "MACHINE.val")) diff --git a/tests/test-browser-evaluate.rkt b/tests/test-browser-evaluate.rkt index a705804..16ee6ac 100644 --- a/tests/test-browser-evaluate.rkt +++ b/tests/test-browser-evaluate.rkt @@ -1,5 +1,5 @@ #lang racket -(require "browser-evaluate.rkt" +(require (planet dyoo/browser-evaluate) "../js-assembler/package.rkt" "../make/make-structs.rkt")