Increase test coverage a touch

This commit is contained in:
kpdecker
2014-08-14 12:25:35 -05:00
parent 9ab31e1fc6
commit cb22ee5681
15 changed files with 186 additions and 44 deletions
@@ -99,6 +99,7 @@ JavaScriptCompiler.prototype = {
// Flush any trailing content that might be pending.
this.pushSource('');
/* istanbul ignore next */
if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
throw new Exception('Compile completed with content left on stack');
}
@@ -551,10 +552,6 @@ JavaScriptCompiler.prototype = {
var helper = this.setupHelper(paramSize, name);
var lookup = (isSimple ? helper.name + ' || ' : '') + nonHelper + ' || helperMissing';
if (helper.paramsInit) {
lookup += ',' + helper.paramsInit;
}
this.push('((' + lookup + ').call(' + helper.callParams + '))');
// Always flush subexpressions. This is both to prevent the compounding size issue that
@@ -849,6 +846,7 @@ JavaScriptCompiler.prototype = {
return item.value;
} else {
if (!inline) {
/* istanbul ignore next */
if (!this.stackSlot) {
throw new Exception('Invalid stack pop');
}