Skip to content

Commit

Permalink
in the middle of getting the repl tests in place.
Browse files Browse the repository at this point in the history
  • Loading branch information
dyoo committed Apr 18, 2013
1 parent c6b89c6 commit 53adcce
Show file tree
Hide file tree
Showing 4 changed files with 4,325 additions and 4 deletions.
1 change: 0 additions & 1 deletion whalesong/js-assembler/runtime-src/baselib-structs.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
node.append(params.recur(this._fields[i]));
}
node.append($('<span/>').text(")").addClass('rParen'));
console.log(node);
return node.get(0);
};

Expand Down
27 changes: 24 additions & 3 deletions whalesong/repl-prototype/htdocs/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
results.push(that.M.e[that.M.e.length - 1 - i]);
}
for (i = 0; i < results.length; i++) {
print(that, results[i]);
that.printlnIgnoringVoid(results[i]);
};
k();
};
Expand Down Expand Up @@ -204,10 +204,11 @@
};


// Print: Repl racket-value -> void
// printlnIgnoringVoid: racket-value -> void
// Prints the racket value out, followed by a newline,
// unless VOID is being printed.
var print = function(that, elt) {
Repl.prototype.printlnIgnoringVoid = function(elt) {
var that = this;
var outputPort = that.M.params.currentOutputPort;
if (elt !== plt.runtime.VOID) {
outputPort.writeDomNode(
Expand All @@ -218,6 +219,26 @@
}
};

// print: racket-value -> void
Repl.prototype.print = function(elt) {
var that = this;
var outputPort = that.M.params.currentOutputPort;
outputPort.writeDomNode(
that.M,
plt.runtime.toDomNode(elt, that.M.params['print-mode']));
};

// println: racket-value -> void
// Displays the racket value out, followed by a newline,
Repl.prototype.display = function(elt) {
var that = this;
var outputPort = that.M.params.currentOutputPort;
outputPort.writeDomNode(
that.M,
plt.runtime.toDomNode(elt, 'display'));
};



//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
Expand Down
20 changes: 20 additions & 0 deletions whalesong/repl-prototype/htdocs/tests.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<script src="collects/runtime.js"></script>
<script src="collects/library.js"></script>
<script src="easyXDM-min.js"></script>
<script src="repl.js"></script>
<script src="tests.js"></script>
</head>
<body>

<h1>Repl tests</h1>
<p>This page tests the behavior of REPL compilation.</p>

<div id="is-running"></div>
<div id="failure-index">Failures: </div>


</body>
</html>
Loading

0 comments on commit 53adcce

Please sign in to comment.