summaryrefslogtreecommitdiff
path: root/ruby/test/Slice/macros/Client.rb
blob: 47146da622fcabca9f136e50e3288c5ca008b2e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env ruby
#
# Copyright (c) ZeroC, Inc. All rights reserved.
#

require 'Ice'
Ice::loadSlice('Test.ice')

class Client < ::TestHelper
    def run(args)
        print "testing Slice predefined macros... "
        STDOUT.flush
        d = Test::Default.new
        test(d.x == 10)
        test(d.y == 10)

        nd = Test::NoDefault.new
        test(nd.x != 10)
        test(nd.y != 10)

        c = Test::RubyOnly.new
        test(c.lang.eql? "ruby")
        test(c.version == Ice::intVersion())
        puts "ok"
    end
end