           start
             = "a" { return @val }
         '''
-        expect(parser.parse "a").to.equal "2"
+        expect(tryParse parser, "a").to.equal "2"
 
       suite 'predicates', ->
-        test 'semantic not code', ->
-          parser = PEG.buildParser '''
-            start
-              = !{return typeof Array is "undefined"}
-          '''
-          expect(parser.parse "").to.equal ""
+        suite 'semantic not code', ->
+          test 'success on |false| return', ->
+            parser = PEG.buildParser '''
+              start
+                = !{return typeof Array is "undefined"}
+            '''
+            expect(tryParse parser, "").to.equal ""
+          test 'failure on |true| return', ->
+            parser = PEG.buildParser '''
+              start
+                = !{return typeof Array isnt "undefined"}
+            '''
+            expect(tryParse parser, "").to.be.a Error
 
-        test 'semantic and code', ->
-          parser = PEG.buildParser '''
-            start
-              = &{return typeof Array isnt "undefined"}
-          '''
-          expect(parser.parse "").to.equal ""
+        suite 'semantic and code', ->
+          test 'success on |true| return', ->
+            parser = PEG.buildParser '''
+              start
+                = &{return typeof Array isnt "undefined"}
+            '''
+            expect(tryParse parser, "").to.equal ""
+          test 'failure on |false| return', ->
+            parser = PEG.buildParser '''
+              start
+                = &{return typeof Array is "undefined"}
+            '''
+            expect(tryParse parser, "").to.be.a Error
 
 
       suite 'variable use', ->

  expect = global.expect
  PEG = global.PEG
  PEGCoffee = global.PEGCoffee


# Test suite for the plugin  

            start
              = a:"a" &{return a is "a"}
          '''
          expect(tryParse parser, "a").to.eql ["a", ""]
        
        test 'can use the |offset| variable to get the current parse position', ->
          parser = PEG.buildParser '''
            start
              = "a" &{return offset is 1}
          '''
          expect(tryParse parser, "a").to.eql ["a", ""]

        test 'can use the |line| and |column| variables to get the current line and column', ->
          parser = PEG.buildParser '''
