Skip to content
Browse files

switching over to use browser-evaluate planet package

  • Loading branch information...
1 parent 571ccf1 commit 9dced96ab294e4e7700903b6a228051c6c600515 Danny Yoo committed Aug 18, 2011
Showing with 12 additions and 5 deletions.
  1. +1 −1 README
  2. +10 −3 tests/test-assemble.rkt
  3. +1 −1 tests/test-browser-evaluate.rkt
View
2 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.
View
13 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"))
View
2 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")

0 comments on commit 9dced96

Please sign in to comment.
Something went wrong with that request. Please try again.