Sha256: a32c1c4512d37acb8e111c04e111fe4b7b9caa3a72f85e29aa4f0b492d881331
Contents?: true
Size: 688 Bytes
Versions: 21
Compression:
Stored size: 688 Bytes
Contents
require 'test_helper' require 'review/compiler' class LocationTest < Test::Unit::TestCase def setup end def test_lineno f = StringIO.new("a\nb\nc\n") location = ReVIEW::Location.new('foo', f) assert_equal 0, location.lineno f.gets assert_equal 1, location.lineno end def test_string location = ReVIEW::Location.new('foo', StringIO.new("a\nb\nc\n")) assert_equal 'foo:0', location.string end def test_to_s location = ReVIEW::Location.new('foo', StringIO.new("a\nb\nc\n")) assert_equal 'foo:0', location.to_s end def test_to_s_nil location = ReVIEW::Location.new('foo', nil) assert_equal 'foo:nil', location.to_s end end
Version data entries
21 entries across 21 versions & 1 rubygems