<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>trunk/as2api</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">tc_doc_comment.rb</a></tt></td><td align="right" id="added">+52</td><td align="right" id="removed">-33</td><td nowrap="nowrap" align="center">262 -&gt; 263</td></tr>
</table>
<pre class="comment">
Update unit tests to account for API changes made a while back (bad Dave)
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">trunk/as2api</span><br />
<div class="fileheader"><big><b>tc_doc_comment.rb</b></big> <small id="info">262 -&gt; 263</small></div>
<pre class="diff"><small id="info">--- trunk/as2api/tc_doc_comment.rb        2006-01-05 21:47:12 UTC (rev 262)
+++ trunk/as2api/tc_doc_comment.rb        2006-01-05 21:48:42 UTC (rev 263)
@@ -3,58 +3,77 @@
</small></pre><pre class="diff" id="context"> require 'api_loader'
 
 class TC_DocComment &lt; Test::Unit::TestCase
</pre><pre class="diff" id="removed">-  def test_strip_stars()
-    doc = DocComment.new(LocalTypeResolver.new)
-    initial = "foo = a * b\nbar!"
-    with_stars = "\t **#{initial}"
-    assert_equal(initial, doc.strip_stars(with_stars))
-  end
-
</pre><pre class="diff" id="context">   def test_description()
</pre><pre class="diff" id="removed">-    doc = DocComment.new(LocalTypeResolver.new)
</pre><pre class="diff" id="context">     text = "foo bar\n *blat\n * @param foo bar\n blat ping pong\n *"
</pre><pre class="diff" id="removed">-    doc.parse(text)
-    assert_equal("foo bar\nblat", doc.description)
</pre><pre class="diff" id="added">+    comment_data = parse_it(text)
+    assert_equal("foo bar\nblat", comment_data[0].inlines[0].strip)
</pre><pre class="diff" id="context">   end
 
   def test_params()
</pre><pre class="diff" id="removed">-    doc = DocComment.new(LocalTypeResolver.new)
</pre><pre class="diff" id="context">     text = "*\n * @param foo bar\n blat ping pong\n *"
</pre><pre class="diff" id="removed">-    doc.parse(text)
-    assert_equal("bar\nblat ping pong", doc.param("foo"))
</pre><pre class="diff" id="added">+    comment_data = parse_it(text)
+    expected = ParamBlockTag.new();
+    expected.param_name = "foo"
+    expected.add_inline("bar\n blat ping pong\n")
+    assert_equal(expected, comment_data[1])
</pre><pre class="diff" id="context">   end
 
   def test_return()
</pre><pre class="diff" id="removed">-    doc = DocComment.new(LocalTypeResolver.new)
</pre><pre class="diff" id="context">     text = "*\n * @return foo bar\n blat\n *"
</pre><pre class="diff" id="removed">-    doc.parse(text)
-    assert_equal("foo bar\nblat", doc.desc_return)
</pre><pre class="diff" id="added">+    comment_data = parse_it(text)
+    expected = ReturnBlockTag.new();
+    expected.add_inline(" foo bar\n blat\n")
+    assert_equal(expected, comment_data[1])
</pre><pre class="diff" id="context">   end
 
   def test_see()
</pre><pre class="diff" id="removed">-    doc = DocComment.new(LocalTypeResolver.new)
</pre><pre class="diff" id="context">     text = "*\n * @see foo bar\n blat\n *"
</pre><pre class="diff" id="removed">-    doc.parse(text)
-    expected = "foo bar\nblat"
-    assert(doc.seealso_a.member?(expected), "@see didn't have #{expected.inspect}")
</pre><pre class="diff" id="added">+    comment_data = parse_it(text)
+    expected = BlockTag.new
+    expected.add_inline("\n ")
+    assert_equal(expected, comment_data[0])
+    expected = SeeBlockTag.new
+    expected.add_inline("foo bar\nblat")
+    assert_equal(expected, comment_data[1])
+    #assert(doc.seealso_a.member?(expected), "@see didn't have #{expected.inspect}")
</pre><pre class="diff" id="context">   end
 
   def test_throws()
</pre><pre class="diff" id="removed">-    doc = DocComment.new(LocalTypeResolver.new)
</pre><pre class="diff" id="context">     text = "*\n * @throws foo.Bbar blat\nping\n *"
</pre><pre class="diff" id="removed">-    doc.parse(text)
-    assert("blat\nping", doc.describe_exception("foo.Bar"))
</pre><pre class="diff" id="added">+    comment_data = parse_it(text)
+    expected = ThrowsBlockTag.new();
+    expected.add_inline("blat\nping")
+    assert(expected, comment_data[1])
</pre><pre class="diff" id="context">   end
 
</pre><pre class="diff" id="removed">-  def test_package_html
-    [
-      "&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;",
-      "&lt;body&gt;te&lt;b&gt;st&lt;/b&gt;&lt;/body&gt;"
-    ].each do |text|
-      PackageHTML.process(text) do |element|
-        a = REXML::XPath.match(element, "descendant::text()").join
-        assert_equal("test", a)
-      end
-    end
</pre><pre class="diff" id="added">+#  def test_package_html
+#    [
+#      "&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;",
+#      "&lt;body&gt;te&lt;b&gt;st&lt;/b&gt;&lt;/body&gt;"
+#    ].each do |text|
+#      PackageHTML.process(text) do |element|
+#        a = REXML::XPath.match(element, "descendant::text()").join
+#        assert_equal("test", a)
+#      end
+#    end
+#  end
+
+  def parse_it(text)
+    comment_data = CommentData.new
+
+    input = StringIO.new(text)
+    input.lineno = 1
+    lexer = ActionScript::ParseDoc::DocCommentLexer.new(input)
+    lexer.source = caller.last
+    parser = ActionScript::ParseDoc::DocCommentParser.new(lexer)
+    parse_conf_build = ConfigBuilder.new
+    config = parse_conf_build.build_method_config
+    type_resolver = LocalTypeResolver.new(nil)
+    handler = OurDocCommentHandler.new(comment_data, config, type_resolver)
+    parser.handler = handler
+
+    parser.parse_comment
+
+    comment_data
</pre><pre class="diff" id="context">   end
 end
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.11</small></center>
</body></html>