marijnh/acorn — pull request #28 by keeyipchan (2013-01-27 02:18:20+00:00)
Title: Add testAssert() for arbitrary tests; fix skinLineComments() off-by-1

Add testAssert() for arbitrary tests; fix skinLineComments() passing off-by-1 character to onComment(slice(.., end))

Example of the off-by-1 error:
```
function TestComments() {
// Bear class
function Bear(x,y,z) {
this.position = [x||0,y||0,z||0]
}

Bear.prototype.roar = function(message) {
return 'RAWWW: ' + message; // Whatever
};

function Cat() {
/* 1
2
3*/
}

Cat.prototype.roar = function(message) {
return 'MEOOWW: ' + /*stuff*/ message;
};
}
Assertion failed:
" Bear clas" !== " Bear class"
502 tests run in 59ms
1 failures.
```