Sha256: c0cf370c428a093379e2847281a4ebc3b1082871fcb3c4d09e68900f2c320efd

Contents?: true

Size: 530 Bytes

Versions: 77

Compression:

Stored size: 530 Bytes

Contents

# -*- coding: utf-8 -*-

class TestGLibFileUtils < Test::Unit::TestCase
  include GLibTestUtils

  def test_format_size_for_display
    only_glib_version(2, 16, 0)

    assert_equal("1.0 KB", GLib.format_size_for_display(1024))
    assert_equal("10.0 KB", GLib.format_size_for_display(1024 * 10))
    assert_equal("1.0 MB", GLib.format_size_for_display(1024 * 1024))
    assert_equal("1.5 MB", GLib.format_size_for_display(1024 * 1024 * 1.5))
    assert_equal("1.0 GB", GLib.format_size_for_display(1024 * 1024 * 1024))
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
glib2-1.1.5-x86-mingw32 test/test_file_utils.rb
glib2-1.1.5 test/test_file_utils.rb
glib2-1.1.4-x86-mingw32 test/test_file_utils.rb
glib2-1.1.4 test/test_file_utils.rb
glib2-1.1.3-x86-mingw32 test/test_file_utils.rb
glib2-1.1.3 test/test_file_utils.rb
glib2-1.1.2 test/test_file_utils.rb
glib2-1.1.2-x86-mingw32 test/test_file_utils.rb
glib2-1.1.1-x86-mingw32 test/test_file_utils.rb
glib2-1.1.1 test/test_file_utils.rb
glib2-1.1.0-x86-mingw32 test/test_file_utils.rb
glib2-1.1.0 test/test_file_utils.rb
glib2-1.0.3-x86-mingw32 test/test_file_utils.rb
glib2-1.0.3 test/test_file_utils.rb
glib2-1.0.2-x86-mingw32 test/test_file_utils.rb
glib2-1.0.2 test/test_file_utils.rb
glib2-1.0.1 test/test_file_utils.rb
glib2-1.0.1-x86-mingw32 test/test_file_utils.rb
glib2-1.0.0-x86-mingw32 test/test_file_utils.rb
glib2-1.0.0 test/test_file_utils.rb