require 'test/unit'
require 'criteria.rb'
include Criteria


class TestBasic < Test::Unit::TestCase
  def test_criteria
    i=r=nil

    assert_nothing_raised {
      i = Table.new
      r = ((i.foo > 5) & (i.bar < 1)) + i.baz.foo(1,2,3)
    }

    str = "(+ (& (> :foo 5) (< :bar 1)) (foo :baz 1 2 3))"
    assert_equal(str, r.inspect)
  end
end
