Sha256: 6ab442a797fe3676e6b3ce89d92a4dfad4b8f550de19e48706d8ebad961e6274
Contents?: true
Size: 1.08 KB
Versions: 11
Compression:
Stored size: 1.08 KB
Contents
require 'minitest_helper' class TestMatrix < TestInterpreterBase def setup end def test_integer assert_iq_equal( '(1 2 3; 4 5 6)', '(1 2 3; 4 5 6)' ) assert_iq_equal( '(1 2 3; 4 5 6) + (1 2 3; 4 5 6)', '(2 4 6; 8 10 12)' ) assert_iq_equal( '(1 2 3; 4 5 6) - (2 4 1; 8 3 9)', '(-1 -2 2; -4 2 -3)' ) assert_iq_equal( '(1 2; 3 4) * (1 2; 3 4)', '(7 10; 15 22)' ) assert_iq_equal( '(1 2; 3 4) ** 2', '(7 10; 15 22)' ) assert_iq_equal( '(1 2; 3 4) ** 2', '(7 10; 15 22)' ) assert_iq_equal( '(1 2; 3 4) * (1 2)', '(5 11)' ) assert_iq_equal( '(1 2 3; 4 5 6)t', '(1 4; 2 5; 3 6)' ) assert_iq_equal( '(1 2 3 4 5 6) + (1 2 3 4 5 6)', '(2 4 6; 8 10 12)' ) end def test_float assert_iq_equal( '(1.0 2.0 3 4.2 5.3 6)t', '(1.0 4.2; 2.0 5.3; 3 6)' ) assert_iq_equal( '(1.0 2.0 3 4.2 5.3 6)t', '(1.0 4.2; 2.0 5.3; 3 6)' ) end end
Version data entries
11 entries across 11 versions & 2 rubygems