~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to rb/test/Ice/defaultValue/AllTests.rb

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# **********************************************************************
 
2
#
 
3
# Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
 
4
#
 
5
# This copy of Ice is licensed to you under the terms described in the
 
6
# ICE_LICENSE file included in this distribution.
 
7
#
 
8
# **********************************************************************
 
9
 
 
10
def allTests()
 
11
    print "testing default values... "
 
12
    STDOUT.flush
 
13
 
 
14
    v = Test::Struct1.new
 
15
    test(!v.boolFalse)
 
16
    test(v.boolTrue)
 
17
    test(v.b == 254)
 
18
    test(v.s == 16000)
 
19
    test(v.i == 3)
 
20
    test(v.l == 4)
 
21
    test(v.f == 5.0)
 
22
    test(v.d == 6.0)
 
23
    test(v.str == "foo bar")
 
24
    test(v.c == Test::Color::Red)
 
25
    test(v.noDefault == '')
 
26
 
 
27
    v = Test::Base.new
 
28
    test(!v.boolFalse)
 
29
    test(v.boolTrue)
 
30
    test(v.b == 1)
 
31
    test(v.s == 2)
 
32
    test(v.i == 3)
 
33
    test(v.l == 4)
 
34
    test(v.f == 5.0)
 
35
    test(v.d == 6.0)
 
36
    test(v.str == "foo bar")
 
37
    test(v.noDefault == '')
 
38
 
 
39
    v = Test::Derived.new
 
40
    test(!v.boolFalse)
 
41
    test(v.boolTrue)
 
42
    test(v.b == 1)
 
43
    test(v.s == 2)
 
44
    test(v.i == 3)
 
45
    test(v.l == 4)
 
46
    test(v.f == 5.0)
 
47
    test(v.d == 6.0)
 
48
    test(v.str == "foo bar")
 
49
    test(v.c == Test::Color::Green)
 
50
    test(v.noDefault == '')
 
51
 
 
52
    v = Test::BaseEx.new
 
53
    test(!v.boolFalse)
 
54
    test(v.boolTrue)
 
55
    test(v.b == 1)
 
56
    test(v.s == 2)
 
57
    test(v.i == 3)
 
58
    test(v.l == 4)
 
59
    test(v.f == 5.0)
 
60
    test(v.d == 6.0)
 
61
    test(v.str == "foo bar")
 
62
    test(v.noDefault == '')
 
63
 
 
64
    v = Test::DerivedEx.new
 
65
    test(!v.boolFalse)
 
66
    test(v.boolTrue)
 
67
    test(v.b == 1)
 
68
    test(v.s == 2)
 
69
    test(v.i == 3)
 
70
    test(v.l == 4)
 
71
    test(v.f == 5.0)
 
72
    test(v.d == 6.0)
 
73
    test(v.str == "foo bar")
 
74
    test(v.noDefault == '')
 
75
    test(v.c == Test::Color::Green)
 
76
 
 
77
    puts "ok"
 
78
end