mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Use assertion methods in File test
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
##
|
||||
# IO Test
|
||||
|
||||
assert('File', '15.2.21') do
|
||||
File.class == Class
|
||||
end
|
||||
|
||||
assert('File', '15.2.21.2') do
|
||||
File.superclass == IO
|
||||
end
|
||||
# File Test
|
||||
|
||||
assert('File TEST SETUP') do
|
||||
MRubyIOTestUtil.io_test_setup
|
||||
end
|
||||
|
||||
assert('File', '15.2.21') do
|
||||
assert_equal Class, File.class
|
||||
end
|
||||
|
||||
assert('File', '15.2.21.2') do
|
||||
assert_equal IO, File.superclass
|
||||
end
|
||||
|
||||
assert('File#initialize', '15.2.21.4.1') do
|
||||
io = File.open($mrbtest_io_rfname, "r")
|
||||
assert_nil io.close
|
||||
@@ -27,7 +27,7 @@ assert('File#path', '15.2.21.4.2') do
|
||||
assert_equal $mrbtest_io_rfname, io.path
|
||||
io.close
|
||||
assert_equal $mrbtest_io_rfname, io.path
|
||||
io.closed?
|
||||
assert_true io.closed?
|
||||
end
|
||||
|
||||
assert('File.basename') do
|
||||
|
||||
Reference in New Issue
Block a user