MCPcopy Create free account
hub / github.com/apache/thrift / test_default_values

Method test_default_values

test/rb/generation/test_struct.rb:25–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23class TestStructGeneration < Test::Unit::TestCase
24
25 def test_default_values
26 hello = TestNamespace::Hello.new
27
28 assert_kind_of(TestNamespace::Hello, hello)
29 assert_nil(hello.complexer)
30
31 assert_equal(hello.simple, 53)
32 assert_equal(hello.words, 'words')
33
34 assert_kind_of(TestNamespace::Goodbyez, hello.thinz)
35 assert_equal(hello.thinz.val, 36632)
36
37 assert_kind_of(Hash, hello.complex)
38 assert_equal(hello.complex, { 6243 => 632, 2355 => 532, 23 => 532})
39
40 bool_passer = TestNamespace::BoolPasser.new(:value => false)
41 assert_equal false, bool_passer.value
42 end
43
44 def test_goodbyez
45 assert_equal(TestNamespace::Goodbyez.new.val, 325)

Callers

nothing calls this directly

Calls 2

simpleMethod · 0.80
newMethod · 0.45

Tested by

no test coverage detected