blob: b6c60bad4f3278cd79ddad152ae34eaa53d99439 [file] [log] [blame]
Kevin Clark28580f42008-06-18 00:49:17 +00001require File.join(File.dirname(__FILE__), '../test_helper')
Mark Slee89f57162008-01-10 00:53:08 +00002require 'SmallService'
Mark Slee89f57162008-01-10 00:53:08 +00003
Kevin Clark28580f42008-06-18 00:49:17 +00004class TestStructGeneration < Test::Unit::TestCase
Mark Slee89f57162008-01-10 00:53:08 +00005
Kevin Clark28580f42008-06-18 00:49:17 +00006 def test_default_values
Mark Slee89f57162008-01-10 00:53:08 +00007 hello = Hello.new
8
9 assert_kind_of(Hello, hello)
10 assert_nil(hello.complexer)
David Reiss0c90f6f2008-02-06 22:18:40 +000011
Mark Slee89f57162008-01-10 00:53:08 +000012 assert_equal(hello.simple, 53)
13 assert_equal(hello.words, 'words')
14
15 assert_kind_of(Goodbyez, hello.thinz)
16 assert_equal(hello.thinz.val, 36632)
17
18 assert_kind_of(Hash, hello.complex)
19 assert_equal(hello.complex, { 6243 => 632, 2355 => 532, 23 => 532})
20 end
21
22 def test_goodbyez
23 assert_equal(Goodbyez.new.val, 325)
24 end
25
26end