Sha256: e33fbaf1600916e5c6813d69f849b6ff847f7809e5fe50bbafcb78e1d671027d
Contents?: true
Size: 560 Bytes
Versions: 8
Compression:
Stored size: 560 Bytes
Contents
require 'minitest_helper' class TestHilbert < MiniTest::Unit::TestCase def setup end def assert_to_ruby(input, output) assert_equal(Hilbert.to_ruby.compile(input), output) end def test_basis refute_nil ::Hilbert::VERSION end def test_demo_code assert_to_ruby('d/dx(sin(x))', 'd/dx(sin(x))') assert_to_ruby('d/dx(log(x))', 'd/dx(log(x))') assert_to_ruby('f(x, y) = x + y', 'f(x, y) <= x + y') assert_equal(Matrix[[1, 2, 3], [4, 5, 6]].to_q, '(1 2 3; 4 5 6)') assert_equal(Vector[1, 2, 3].to_q, '(1 2 3)') end end
Version data entries
8 entries across 8 versions & 1 rubygems