Sha256: 831e16947303a3ae5a1ae6b8d5d2bf03cf631bde7d5cb688d77968cd34877688
Contents?: true
Size: 526 Bytes
Versions: 7
Compression:
Stored size: 526 Bytes
Contents
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
Version data entries
7 entries across 7 versions & 1 rubygems