Sha256: 85e3ec11d1d18f20685d5180317b9ad0caf3d213a47acf96f542e1bb83a8a76d
Contents?: true
Size: 1.22 KB
Versions: 6
Compression:
Stored size: 1.22 KB
Contents
############################################################################# # test_win32_file_security_ffi.rb # # Tests to ensure that the FFI functions are private ############################################################################# require 'test-unit' require 'win32/file/security' class TC_Win32_File_Security_FFI < Test::Unit::TestCase def setup @singleton_methods = File.methods.map{ |m| m.to_s } @instance_methods = File.instance_methods.map{ |m| m.to_s } end test "internal ffi functions are not public as singleton methods" do assert_false(@singleton_methods.include?('AddAce')) assert_false(@singleton_methods.include?('CloseHandle')) assert_false(@singleton_methods.include?('GetFileSecurityW')) assert_false(@singleton_methods.include?('PathIsRootW')) end test "internal ffi functions are not public as instance methods" do assert_false(@instance_methods.include?('AddAce')) assert_false(@instance_methods.include?('CloseHandle')) assert_false(@instance_methods.include?('GetFileSecurityW')) assert_false(@instance_methods.include?('PathIsRootW')) end def teardown @singleton_methods = nil @instance_methods = nil end end
Version data entries
6 entries across 6 versions & 2 rubygems