test/repo_test.rb in docurium-0.4.0 vs test/repo_test.rb in docurium-0.4.1

- old
+ new

@@ -37,12 +37,12 @@ FileUtils.remove_entry(@dir) end def test_can_parse_headers keys = @data.keys.map { |k| k.to_s }.sort - assert_equal ['files', 'functions', 'globals', 'groups', 'prefix', 'types'], keys - assert_equal 153, @data[:functions].size + assert_equal ['callbacks', 'files', 'functions', 'globals', 'groups', 'prefix', 'types'], keys + assert_equal 154, @data[:functions].size end def test_can_extract_enum_from_define skip("this isn't something we do") assert_equal 41, @data[:globals].size @@ -112,19 +112,25 @@ desc = "<p>Create a new commit in the repository using <code>git_object</code>\n instances as parameters.</p>\n" assert_equal desc, func[:description] end def test_can_group_functions - assert_equal 14, @data[:groups].size + assert_equal 15, @data[:groups].size group, funcs = @data[:groups].first assert_equal 'blob', group assert_equal 6, funcs.size end def test_can_store_mutliple_enum_doc_sections skip("this isn't something we do") idxentry = @data[:types].find { |a| a[0] == 'GIT_IDXENTRY' } assert idxentry, "GIT_IDXENTRY did not get automatically created" assert_equal 2, idxentry[1][:sections].size + end + + def test_can_parse_callback + cb = @data[:callbacks]['git_callback_do_work'] + # we can mostly assume that the rest works as it's the same as for the functions + assert_equal 'int', cb[:return][:type] end end