Skip to content

Commit

Permalink
Merge pull request #3395 from mbrubeck/doctest
Browse files Browse the repository at this point in the history
Fix unit test failures. r=jdm
  • Loading branch information
mbrubeck committed Sep 18, 2014
2 parents 75caade + 140b000 commit 8aeb90e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion components/gfx/text/glyph.rs
Expand Up @@ -484,7 +484,7 @@ impl<'a> GlyphInfo<'a> {
/// Simple glyphs are stored inline in the `entry_buffer`, detailed glyphs are
/// stored as pointers into the `detail_store`.
///
/// ~~~
/// ~~~ignore
/// +- GlyphStore --------------------------------+
/// | +---+---+---+---+---+---+---+ |
/// | entry_buffer: | | s | | s | | s | s | | d = detailed
Expand Down
4 changes: 4 additions & 0 deletions components/layout/construct.rs
Expand Up @@ -109,14 +109,17 @@ pub struct InlineFragmentsConstructionResult {
/// Represents an {ib} split that has not yet found the containing block that it belongs to. This
/// is somewhat tricky. An example may be helpful. For this DOM fragment:
///
/// ```html
/// <span>
/// A
/// <div>B</div>
/// C
/// </span>
/// ```
///
/// The resulting `ConstructionItem` for the outer `span` will be:
///
/// ```ignore
/// InlineFragmentsConstructionItem(Some(~[
/// InlineBlockSplit {
/// predecessor_fragments: ~[
Expand All @@ -128,6 +131,7 @@ pub struct InlineFragmentsConstructionResult {
/// }),~[
/// C
/// ])
/// ```
pub struct InlineBlockSplit {
/// The inline fragments that precede the flow.
pub predecessors: InlineFragments,
Expand Down
2 changes: 1 addition & 1 deletion components/net/fetch/cors_cache.rs
Expand Up @@ -250,7 +250,7 @@ impl CORSCache for CORSCacheSender {
/// A simple task-based CORS Cache that can be sent messages
///
/// #Example
/// ```
/// ```ignore
/// let task = CORSCacheTask::new();
/// let builder = TaskBuilder::new().named("XHRTask");
/// let mut sender = task.get_sender();
Expand Down
8 changes: 4 additions & 4 deletions components/style/selectors.rs
Expand Up @@ -653,8 +653,8 @@ mod tests {
assert!(parse_ns("[Foo]", &namespaces) == Ok(vec!(Selector {
compound_selectors: Arc::new(CompoundSelector {
simple_selectors: vec!(AttrExists(AttrSelector {
name: "Foo".to_string(),
lower_name: "foo".to_string(),
name: Atom::from_slice("Foo"),
lower_name: Atom::from_slice("foo"),
namespace: SpecificNamespace(namespace::Null),
})),
next: None,
Expand All @@ -668,8 +668,8 @@ mod tests {
assert!(parse_ns("[Foo]", &namespaces) == Ok(vec!(Selector {
compound_selectors: Arc::new(CompoundSelector {
simple_selectors: vec!(AttrExists(AttrSelector {
name: "Foo".to_string(),
lower_name: "foo".to_string(),
name: Atom::from_slice("Foo"),
lower_name: Atom::from_slice("foo"),
namespace: SpecificNamespace(namespace::Null),
})),
next: None,
Expand Down
16 changes: 8 additions & 8 deletions components/util/range.rs
Expand Up @@ -137,7 +137,7 @@ impl<I: RangeIndex> Range<I> {
/// Create a new range from beginning and length offsets. This could be
/// denoted as `[begin, begin + length)`.
///
/// ~~~
/// ~~~ignore
/// |-- begin ->|-- length ->|
/// | | |
/// <- o - - - - - +============+ - - - ->
Expand All @@ -154,7 +154,7 @@ impl<I: RangeIndex> Range<I> {

/// The index offset to the beginning of the range.
///
/// ~~~
/// ~~~ignore
/// |-- begin ->|
/// | |
/// <- o - - - - - +============+ - - - ->
Expand All @@ -164,7 +164,7 @@ impl<I: RangeIndex> Range<I> {

/// The index offset from the beginning to the end of the range.
///
/// ~~~
/// ~~~ignore
/// |-- length ->|
/// | |
/// <- o - - - - - +============+ - - - ->
Expand All @@ -174,7 +174,7 @@ impl<I: RangeIndex> Range<I> {

/// The index offset to the end of the range.
///
/// ~~~
/// ~~~ignore
/// |--------- end --------->|
/// | |
/// <- o - - - - - +============+ - - - ->
Expand All @@ -184,7 +184,7 @@ impl<I: RangeIndex> Range<I> {

/// `true` if the index is between the beginning and the end of the range.
///
/// ~~~
/// ~~~ignore
/// false true false
/// | | |
/// <- o - - + - - +=====+======+ - + - ->
Expand All @@ -202,7 +202,7 @@ impl<I: RangeIndex> Range<I> {

/// Shift the entire range by the supplied index delta.
///
/// ~~~
/// ~~~ignore
/// |-- delta ->|
/// | |
/// <- o - +============+ - - - - - | - - - ->
Expand All @@ -216,7 +216,7 @@ impl<I: RangeIndex> Range<I> {

/// Extend the end of the range by the supplied index delta.
///
/// ~~~
/// ~~~ignore
/// |-- delta ->|
/// | |
/// <- o - - - - - +====+ - - - - - | - - - ->
Expand All @@ -230,7 +230,7 @@ impl<I: RangeIndex> Range<I> {

/// Move the end of the range to the target index.
///
/// ~~~
/// ~~~ignore
/// target
/// |
/// <- o - - - - - +====+ - - - - - | - - - ->
Expand Down
3 changes: 1 addition & 2 deletions components/util/str.rs
Expand Up @@ -33,8 +33,7 @@ pub fn is_whitespace(s: &str) -> bool {

/// A "space character" according to:
///
/// http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#
/// space-character
/// http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
pub static HTML_SPACE_CHARACTERS: StaticCharVec = &[
'\u0020',
'\u0009',
Expand Down

0 comments on commit 8aeb90e

Please sign in to comment.