Sha256: 6b4377854cf22595d69051f0b7b7cd81add74ff44b67bff6ee8bc51503faa279

Contents?: true

Size: 310 Bytes

Versions: 5

Compression:

Stored size: 310 Bytes

Contents

require_relative 'test_helper'
class TestTerm < MiniTest::Unit::TestCase
  def test_initializer
    assert_equal 0, Term.new.coefficient
    assert_equal 0, Term.new.exponent
  end

  def test_parsing
    assert_equal 4, Term.parse('4x^2').coefficient
    assert_equal 2, Term.parse('4x^2').exponent
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
polynomials-0.1.5 test/term_test.rb
polynomials-0.1.4 test/term_test.rb
polynomials-0.1.2 test/term_test.rb
polynomials-0.1.1 test/term_test.rb
polynomials-0.1.0 test/term_test.rb