File: test_return_code.rb

package info (click to toggle)
ruby-gnome2 0.15.0-1.1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,704 kB
  • ctags: 8,558
  • sloc: ansic: 69,912; ruby: 19,511; makefile: 97; xml: 35; sql: 13
file content (21 lines) | stat: -rw-r--r-- 852 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require "gnomeprint2"

class TestReturnCode < Test::Unit::TestCase

  def test_to_s
    assert_equal("OK", Gnome::PrintReturnCode::OK.to_s)
    assert_equal("unknown error", Gnome::PrintReturnCode::ERROR_UNKNOWN.to_s)
    assert_equal("bad value", Gnome::PrintReturnCode::ERROR_BADVALUE.to_s)
    assert_equal("no current point",
                 Gnome::PrintReturnCode::ERROR_NOCURRENTPOINT.to_s)
    assert_equal("no current path",
                 Gnome::PrintReturnCode::ERROR_NOCURRENTPATH.to_s)
    assert_equal("text corrupt",
                 Gnome::PrintReturnCode::ERROR_TEXTCORRUPT.to_s)
    assert_equal("bad context",
                 Gnome::PrintReturnCode::ERROR_BADCONTEXT.to_s)
    assert_equal("no page", Gnome::PrintReturnCode::ERROR_NOPAGE.to_s)
    assert_equal("no match", Gnome::PrintReturnCode::ERROR_NOMATCH.to_s)
  end
  
end