gdk4 3.5.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/test/run-test.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (C) 2013-2021 Ruby-GNOME Project Team
3
+ # Copyright (C) 2013-2022 Ruby-GNOME Project Team
4
4
  #
5
5
  # This library is free software; you can redistribute it and/or
6
6
  # modify it under the terms of the GNU Lesser General Public
@@ -26,6 +26,7 @@ run_test(__dir__,
26
26
  "cairo-gobject",
27
27
  "gdk_pixbuf2",
28
28
  "gio2",
29
+ "pango",
29
30
  "gdk4",
30
31
  ]) do
31
32
  begin
@@ -35,8 +36,5 @@ run_test(__dir__,
35
36
  exit(true)
36
37
  end
37
38
 
38
- Gdk.init
39
- Gdk.init_check([$0])
40
-
41
39
  require_relative "gdk-test-utils"
42
40
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2015 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2015-2012 Ruby-GNOME Project Team
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -18,27 +18,24 @@ class TestGdkCursor < Test::Unit::TestCase
18
18
  include GdkTestUtils
19
19
 
20
20
  sub_test_case ".new" do
21
- test "type" do
22
- cursor = Gdk::Cursor.new(:arrow)
23
- assert_equal(Gdk::CursorType::ARROW, cursor.cursor_type)
24
- end
25
-
26
- test "pixbuf" do
21
+ test "texture" do
27
22
  pixbuf = GdkPixbuf::Pixbuf.new(:file => fixture_path("ruby-gnome2-logo.png"))
28
- cursor = Gdk::Cursor.new(pixbuf, 0, 0)
29
- assert_equal(Gdk::CursorType::CURSOR_IS_PIXMAP, cursor.cursor_type)
30
- end
31
-
32
- test "surface" do
33
- only_gdk_version(3, 10, 0)
34
- surface = Cairo::ImageSurface.new(100, 100)
35
- cursor = Gdk::Cursor.new(surface, 0, 0)
36
- assert_equal(Gdk::CursorType::CURSOR_IS_PIXMAP, cursor.cursor_type)
23
+ texture = Gdk::Texture.new(pixbuf)
24
+ cursor = Gdk::Cursor.new(texture, 0, 0)
25
+ assert_equal(texture, cursor.texture)
37
26
  end
38
27
 
39
28
  test "name" do
40
29
  cursor = Gdk::Cursor.new("cross")
41
- assert_equal(Gdk::CursorType::CURSOR_IS_PIXMAP, cursor.cursor_type)
30
+ assert_equal("cross", cursor.name)
31
+ end
32
+
33
+ test "name - multiple" do
34
+ 3.times do |i|
35
+ cursor = Gdk::Cursor.new("cross")
36
+ assert_equal([i, "cross"],
37
+ [i, cursor.name])
38
+ end
42
39
  end
43
40
  end
44
41
  end