           else
             transformedStn.toJs()
         catch error
-          log.error error
+          if expectFailure && isNumber error.failureIndex
+            expectedFailure = error
+            error = null
+          else
+            log.error error
 
           null
 
-        if js != expectedJs
+        showInfo = if expectFailure
+          js || !expectedFailure
+        else
+          js != expectedJs
+
+        if showInfo
           log "\nFAIL: #{name}".red
           log info:
             js:js

            semanticTree: stn
            transformedSemanticTree: if transformedStn != stn then transformedStn else "no change"
          log "\n"
        throw error if error
        assert.eq js, expectedJs

  parseTestSuite: parseTestSuite = (a, b) ->
    map = if b

{CaffeineScript} = Neptune
{isNumber, each, object, array, isArray, log, formattedInspect, isPlainObject, merge, object, stringCount, isString} = Neptune.Art.StandardLib
{CaffeineScriptParser} = CaffeineScript
require "colors"

