1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00

mruby: fix code style

This commit is contained in:
Alex Kotov 2022-02-07 18:48:50 +05:00
parent 507eea0de2
commit 0056a46bbb
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -60,7 +60,7 @@ assert 'KernAux.utoa' do
base = 2 + Random.rand(36 - 2)
assert_raise RangeError, 'can\'t convert negative number to uint64_t' do
KernAux.utoa -1, base
KernAux.utoa(-1, base)
end
number = Random.rand(2**32 - 1)
@ -110,7 +110,7 @@ assert 'KernAux.itoa' do
test_itoa 1, base, '1'
base = 2 + Random.rand(36 - 2)
test_itoa -1, base, '-1'
test_itoa(-1, base, '-1')
number = 2**31 - 1
base = 2 + Random.rand(36 - 2)
@ -166,18 +166,18 @@ assert 'KernAux.utoa10' do
test_utoa10 2**32 - 1, (2**32 - 1).to_s
assert_raise RangeError, 'can\'t convert negative number to uint64_t' do
KernAux.utoa10 -1
KernAux.utoa10(-1)
end
end
assert 'KernAux.itoa10' do
test_itoa10 0, '0'
test_itoa10 1, '1'
test_itoa10 -1, '-1'
test_itoa10(-1, '-1')
test_itoa10 123, '123'
test_itoa10 -123, '-123'
test_itoa10(-123, '-123')
test_itoa10 2**31 - 1, (2**31 - 1).to_s
test_itoa10 -2**31, (-2**31).to_s
test_itoa10(-2**31, (-2**31).to_s)
end
assert 'KernAux.utoa16' do
@ -187,16 +187,16 @@ assert 'KernAux.utoa16' do
test_utoa16 2**32 - 1, (2**32 - 1).to_s(16)
assert_raise RangeError, 'can\'t convert negative number to uint64_t' do
KernAux.utoa16 -1
KernAux.utoa16(-1)
end
end
assert 'KernAux.itoa16' do
test_itoa16 0, '0'
test_itoa16 1, '1'
test_itoa16 -1, '-1'
test_itoa16(-1, '-1')
test_itoa16 0x123, '123'
test_itoa16 -0x123, '-123'
test_itoa16(-0x123, '-123')
test_itoa16 2**31 - 1, (2**31 - 1).to_s(16)
test_itoa16 -2**31, (-2**31).to_s(16)
test_itoa16(-2**31, (-2**31).to_s(16))
end