Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (20 sloc) 0.526 kb
require File.dirname(__FILE__) + '/helper'
class NotPredicateTest < Test::Unit::TestCase
def test_terminal?
rule = NotPredicate.new
assert_equal(false, rule.terminal?)
end
def test_match
rule = NotPredicate.new('a')
match = rule.match(input('a'))
assert_equal(nil, match)
match = rule.match(input('b'))
assert(match)
assert_equal('', match.text)
assert_equal(0, match.length)
end
def test_to_s
rule = NotPredicate.new('a')
assert_equal('!"a"', rule.to_s)
end
end
Jump to Line
Something went wrong with that request. Please try again.