Sha256: 0af84cbc4e59d5614ea15c0307c95ca1f04c5b6f0b3a4499a66af02be13b98f1

Contents?: true

Size: 563 Bytes

Versions: 6

Compression:

Stored size: 563 Bytes

Contents

require 'minitest_helper'

class TestDifferential < TestInterpreterBase
  def setup

  end

  def test_general
    assert_iq_equal(
      'd/dx(e ** x)',
      'e ^ x'
    )

    assert_iq_equal(
      'd/dx(x ** 2)',
      '2x'
    )

    assert_iq_equal(
      'd/dx(x * 2)',
      '2'
    )

    assert_iq_equal(
      'd/dx( sin(x) )',
      'cos( x )'
    )

    assert_iq_equal(
      'd/dx(log( x ))',
      '1 / x'
    )

    assert_iq_equal(
      'd/dx cos(x)',
      '- sin( x )'
    )

    assert_iq_equal(
      'd/dx xx',
      '2x'
    )
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
qlang-0.0.27182123 test/interpreter/test_differential.rb
qlang-0.0.27182122 test/interpreter/test_differential.rb
qlang-0.0.27182121 test/interpreter/test_differential.rb
qlang-0.0.27182120 test/interpreter/test_differential.rb
qlang-0.0.27182110 test/interpreter/test_differential.rb
qlang-0.0.27182100 test/interpreter/test_differential.rb