Sha256: 73f02749ae14732b706bbf1bb88f23ea738d85dc9bc01e649cca0045aa2e6777

Contents?: true

Size: 691 Bytes

Versions: 40

Compression:

Stored size: 691 Bytes

Contents

require 'test_helper'

class ParserTest < Test::Unit::TestCase
  include Sparkql

  def test_error_defaults
    errors = ParserError.new
    assert errors.syntax?
    assert !errors.constraint?
  end

  def test_error_constraint
    errors = ParserError.new(:constraint => true, :syntax => false)
    assert !errors.syntax?
    assert errors.constraint?
  end
  
  def test_process_fatal_errors
    p = ErrorsProcessor.new(ParserError.new(:status => :fatal))
    assert p.fatal_errors?
    assert !p.dropped_errors?
  end

  def test_process_dropped_errors
    p = ErrorsProcessor.new(ParserError.new(:status => :dropped))
    assert p.dropped_errors?
    assert !p.fatal_errors?
  end

end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
sparkql-1.2.8 test/unit/errors_test.rb
sparkql-1.2.7 test/unit/errors_test.rb
sparkql-1.2.6 test/unit/errors_test.rb
sparkql-1.2.5 test/unit/errors_test.rb
sparkql-1.2.4 test/unit/errors_test.rb
sparkql-1.2.3 test/unit/errors_test.rb
sparkql-1.2.2 test/unit/errors_test.rb
sparkql-1.2.1 test/unit/errors_test.rb
sparkql-1.2.0 test/unit/errors_test.rb
sparkql-1.1.17 test/unit/errors_test.rb
sparkql-1.1.16 test/unit/errors_test.rb
sparkql-1.1.15 test/unit/errors_test.rb
sparkql-1.1.14 test/unit/errors_test.rb
sparkql-1.1.13 test/unit/errors_test.rb
sparkql-1.1.12 test/unit/errors_test.rb
sparkql-1.1.11 test/unit/errors_test.rb
sparkql-1.1.10 test/unit/errors_test.rb
sparkql-1.1.9 test/unit/errors_test.rb
sparkql-1.1.8 test/unit/errors_test.rb
sparkql-1.1.7 test/unit/errors_test.rb