Sha256: 6c6dfdde48db799c2831f3cb4e6b48077f4dee3544aa4d58e57b9acd99596285

Contents?: true

Size: 527 Bytes

Versions: 6

Compression:

Stored size: 527 Bytes

Contents

#!/usr/bin/env ruby
# encoding: UTF-8

require_relative 'helper'

class TestExprNot < TestImpl

  def test_not_native
    x = WAB::Impl::Not.new(WAB::Impl::Eq.new('num', 7))
    assert_equal(['NOT', ['EQ', 'num', 7]], x.native, 'NOT native mismatch')
  end

  def test_not
    d = make_sample_data
    x = WAB::Impl::Not.new(WAB::Impl::Eq.new('num', 8))
    assert(x.eval(d), 'checking NOT match')

    x = WAB::Impl::Not.new(WAB::Impl::Eq.new('num', 7))
    refute(x.eval(d), 'checking NOT mismatch')
  end

end # TestExprNot

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wabur-0.7.0 test/test_expr_not.rb
wabur-0.6.2 test/test_expr_not.rb
wabur-0.6.1 test/test_expr_not.rb
wabur-0.6.0 test/test_expr_not.rb
wabur-0.5.0 test/test_expr_not.rb
wabur-0.4.0d1 test/test_expr_not.rb