From: Jean Privat Date: Fri, 28 Nov 2014 01:34:35 +0000 (-0500) Subject: all: fix broken docunits X-Git-Tag: v0.6.11~5^2~3 X-Git-Url: http://nitlanguage.org all: fix broken docunits Signed-off-by: Jean Privat --- diff --git a/lib/geometry/boxes.nit b/lib/geometry/boxes.nit index 1596c1e..b8c9798 100644 --- a/lib/geometry/boxes.nit +++ b/lib/geometry/boxes.nit @@ -75,12 +75,12 @@ interface Boxed[N: Numeric] self.top >= other.bottom and other.top >= self.bottom end - # Create a bounding box that englobes the actual bounding box. + # Create a bounding box that encloses the actual bounding box. # `dist` is the distance between the inner boundaries and the outer boundaries. # ~~~ # var p = new Point[Int](5,10) # var b = p.padded(3) - # assert b.top == 2 and b.bot = 8 and b.left == 7 and b.right == 13 + # assert b.left == 2 and b.right == 8 and b.top == 13 and b.bottom == 7 # ~~~ fun padded(dist: N): Box[N] do return new Box[N].lrtb(left - dist, right + dist, top + dist, bottom - dist) end diff --git a/lib/json/dynamic.nit b/lib/json/dynamic.nit index d15ceb7..2f73fea 100644 --- a/lib/json/dynamic.nit +++ b/lib/json/dynamic.nit @@ -74,8 +74,8 @@ class JsonValue # # require: `self.is_numeric` # - # assert "1.234".to_json_value.to_numeric = 1.234 - # assert "1234".to_json_value.to_numeric = 1234 + # assert "1.234".to_json_value.to_numeric == 1.234 + # assert "1234".to_json_value.to_numeric == 1234 fun to_numeric: Numeric do if is_int then return to_i diff --git a/lib/sax/helpers/sax_locator_impl.nit b/lib/sax/helpers/sax_locator_impl.nit index c736a46..eb04677 100644 --- a/lib/sax/helpers/sax_locator_impl.nit +++ b/lib/sax/helpers/sax_locator_impl.nit @@ -19,24 +19,17 @@ import sax::sax_locator # can use it to make a persistent snapshot of a locator at any # point during a document parse: # -# module example -# # -# import sax::helpers::SAXLocatorImpl -# import sax::ContentHandler -# # +# import sax::helpers::sax_locator_impl +# import sax::content_handler +# # class Example super ContentHandler -# private var _locator: nullable SAXLocator = null +# private var locator: SAXLocator # private var start_loc: nullable SAXLocator = null -# # -# fun locator=(Locator locator) do -# # note the locator -# _locator = locator -# end -# # -# fun start_document do +# +# redef fun start_document do # # save the location of the start of the document # # for future use. -# start_loc = new SAXLocatorImpl.from(locator) +# start_loc = new SAXLocatorImpl.with(locator) # end # end # diff --git a/lib/scene2d.nit b/lib/scene2d.nit index ac5a571..b01c3e5 100644 --- a/lib/scene2d.nit +++ b/lib/scene2d.nit @@ -151,8 +151,8 @@ interface View # This method must be implemented for each specific view. # A traditional way of implementation is to use a double-dispatch mechanism # - # Exemple: # class MyView + # super View # redef fun draw_sprite(s) do s.draw_on_myview(self) # end # redef class Sprite diff --git a/lib/signals.nit b/lib/signals.nit index f1044e8..f9709da 100644 --- a/lib/signals.nit +++ b/lib/signals.nit @@ -47,7 +47,7 @@ # r.handle_signal(sigint, true) # r.handle_signal(sigalarm, true) # -# Ask system to receive a `sigalarm` signal in 1 second +# # Ask system to receive a `sigalarm` signal in 1 second # set_alarm(1) # # loop diff --git a/lib/standard/string.nit b/lib/standard/string.nit index 26251ce..62d5ddc 100644 --- a/lib/standard/string.nit +++ b/lib/standard/string.nit @@ -1405,7 +1405,7 @@ abstract class Buffer # # SEE: `Char::is_letter` for the definition of a letter. # - # var b = new FlatBuffer.from("jAVAsCriPt")" + # var b = new FlatBuffer.from("jAVAsCriPt") # b.capitalize # assert b == "Javascript" # b = new FlatBuffer.from("i am root")