Sha256: 3b835e03825178d0a80cebd8a11d997b6b9e3354f43fb47ff12c634340beae3a

Contents?: true

Size: 551 Bytes

Versions: 2

Compression:

Stored size: 551 Bytes

Contents

require 'minitest_helper'

class TestLimit < TestInterpreterBase
  def setup
  end

  def assert_iq_equal(output, input)
    assert_equal(Hilbert::Iq.execute(input), output)
  end

  def test_general
    assert_iq_equal(
      'oo',
      'lim[x->0] 1/x'
    )

    assert_iq_equal(
      '10.0',
      'lim[x->10] x'
    )

    # assert_iq_equal(
    #   '2.7182682371744895',
    #   'lim[x->oo] (1 + 1/x)^x'
    # )

    assert_iq_equal(
      'oo',
      'lim[x->oo] x'
    )

    assert_iq_equal(
      '0.0',
      'lim[x->0] x'
    )
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hilbert-0.0.2700100 test/interpreter/test_limit.rb
hilbert-0.0.2700001 test/interpreter/test_limit.rb