fix tests according to array change

This commit is contained in:
Torsten Ruger
2015-06-16 18:12:15 +03:00
parent 1ee0f7c006
commit 7d01c1193c
3 changed files with 30 additions and 22 deletions

View File

@ -21,28 +21,28 @@ class BasicSof < MiniTest::Test
end
def test_array_array
@out = [true, 1 , [true , 12 ]]
check "-true\n-1\n-[true, 12]"
check "- true\n- 1\n- [true, 12]"
end
def test_array_array_reverse
@out = [ [true , 12 ], true, 1]
check "-[true, 12]\n-true\n-1"
check "- [true, 12]\n- true\n- 1"
end
def test_array_array_array
@out = [true, 1 , [true , 12 , [true , 123 ]]]
check "-true\n-1\n--true\n -12\n -[true, 123]"
check "- true\n- 1\n- - true\n - 12\n - [true, 123]"
end
def test_simple_hash
@out = { one: 1 , tru: true }
@out = { :one => 1 , :tru => true }
check "{:one => 1, :tru => true}"
end
def test_array_hash
@out = [true, 1 , { one: 1 , tru: true }]
check "-true\n-1\n-{:one => 1, :tru => true}"
@out = [true, 1 , { :one => 1 , :tru => true }]
check "- true\n- 1\n- {:one => 1, :tru => true}"
end
def test_array_recursive
ar = [true, 1 ]
ar << ar
@out = ar
check "&1 [true, 1, *1]"
check "&1 [true, 1, ->1]"
end
end