Skip to content

Commit

Permalink
Fix in tests and trace directly to console
Browse files Browse the repository at this point in the history
  • Loading branch information
norm2782 committed Dec 27, 2011
1 parent 49fa963 commit ee47284
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions LazyJS.js
@@ -1,10 +1,9 @@
(function (window) {
"use strict";

var traceOn, traceFn, evalCounter, nodeCounter;
var traceOn, evalCounter, nodeCounter;

traceOn = false;
traceFn = console.log;

evalCounter = 0;
nodeCounter = 0;
Expand All @@ -15,7 +14,7 @@

function trace(m, s) {
if (traceOn) {
traceFn(m + ": " + s);
console.log(m + ": " + s);
}
}

Expand Down
7 changes: 4 additions & 3 deletions tests.js
Expand Up @@ -6,6 +6,7 @@

// setup
function init() {
// enableTrace();
}

function print(x) {
Expand Down Expand Up @@ -178,7 +179,7 @@
trace("inc2: " + inc2);
two1 = 2;
// var two2 = new AppN_WHNF(2);
two3 = new App(new LFun(0, function () { return 2; }), []);
two3 = new App(new LFun(function () { return 2; }), []);
arr = [two1];
// trace("two2: " + two2);
trace("two3: " + two3);
Expand Down Expand Up @@ -206,8 +207,8 @@

function main() {
init();
// testMisc();
// tryOut();
testMisc();
tryOut();
testSieve();
}

Expand Down

0 comments on commit ee47284

Please sign in to comment.