Skip to content

Commit

Permalink
Old test removed, parser state made more aggressive in checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
blambeau committed Jan 25, 2010
1 parent 9ac473a commit e81ea5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 36 deletions.
14 changes: 7 additions & 7 deletions lib/wlang/parser_state.rb
Expand Up @@ -37,13 +37,13 @@ def initialize(parser, parent = nil)

# Checks internals
def check
raise "WLang::Parser::State fatal: missing parser" unless parser
raise "WLang::Parser::State fatal: missing hosted" unless hosted
raise "WLang::Parser::State fatal: missing template" unless template
raise "WLang::Parser::State fatal: missing dialect" unless dialect
raise "WLang::Parser::State fatal: missing offset" unless offset
raise "WLang::Parser::State fatal: missing scope" unless scope
raise "WLang::Parser::State fatal: missing buffer" unless buffer
raise "WLang::Parser::State fatal: invalid parser #{parser}" unless ::WLang::Parser===parser
raise "WLang::Parser::State fatal: invalid hosted #{hosted}" unless ::WLang::HostedLanguage===hosted
raise "WLang::Parser::State fatal: missing template #{template}" unless ::WLang::Template===template
raise "WLang::Parser::State fatal: missing dialect #{dialect}" unless ::WLang::Dialect===dialect
raise "WLang::Parser::State fatal: missing offset #{offset}" unless Integer===offset
raise "WLang::Parser::State fatal: missing scope #{scope}" unless ::WLang::HashScope===scope
raise "WLang::Parser::State fatal: missing buffer #{buffer}" unless buffer.respond_to?(:<<)
self
end

Expand Down
29 changes: 0 additions & 29 deletions test/unit/wlang/parser_context_test.rb

This file was deleted.

0 comments on commit e81ea5e

Please sign in to comment.