Skip to content

Commit

Permalink
Merge pull request #22 from emwalker/rust-toolchain
Browse files Browse the repository at this point in the history
Add rust-toolchain.toml
  • Loading branch information
jaytaph authored Sep 24, 2023
2 parents 49c3d7c + 5c5f862 commit 558e3dc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "stable"
30 changes: 15 additions & 15 deletions src/html5_parser/input_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ mod test {
col: 4
}
);
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
assert_eq!(
is.position,
Position {
Expand All @@ -540,7 +540,7 @@ mod test {
col: 4
}
);
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
assert_eq!(
is.position,
Position {
Expand Down Expand Up @@ -675,13 +675,13 @@ mod test {
assert_eq!(is.read_char().utf8(), 'c');
assert_eq!(is.read_char().utf8(), 'd');
assert_eq!(is.chars_left(), 0);
assert_eq!(is.eof(), true);
assert!(is.eof());

is.reset();
assert_eq!(is.look_ahead(0).utf8(), 'a');
assert_eq!(is.look_ahead(3).utf8(), 'c');
assert_eq!(is.look_ahead(1).utf8(), 'b');
assert_eq!(is.look_ahead(100).is_eof(), true);
assert!(is.look_ahead(100).is_eof());

is.seek(SeekMode::SeekSet, 0);
assert_eq!(is.look_ahead_slice(1), "a");
Expand Down Expand Up @@ -733,19 +733,19 @@ mod test {
assert_eq!(is.read_char().utf8(), 'a');
assert_eq!(is.read_char().utf8(), 'b');
assert_eq!(is.read_char().utf8(), 'c');
assert_eq!(is.read_char().is_eof(), true);
assert_eq!(is.read_char().is_eof(), true);
assert_eq!(is.read_char().is_eof(), true);
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
assert!(is.read_char().is_eof());
assert!(is.read_char().is_eof());
assert!(is.read_char().is_eof());
is.unread();
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
is.unread();
is.unread();
assert_eq!(is.read_char().is_eof(), false);
assert_eq!(is.read_char().is_eof(), true);
assert!(!is.read_char().is_eof());
assert!(is.read_char().is_eof());
is.unread();
is.unread();
assert_eq!(is.read_char().is_eof(), false);
assert!(!is.read_char().is_eof());
is.unread();
is.unread();
is.unread();
Expand All @@ -764,12 +764,12 @@ mod test {
assert_eq!(is.read_char().utf8(), 'a');
assert_eq!(is.read_char().utf8(), 'b');
assert_eq!(is.read_char().utf8(), 'c');
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
is.unread();
is.unread();
assert_eq!(is.read_char().utf8(), 'c');
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
is.unread();
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
}
}
8 changes: 4 additions & 4 deletions src/html5_parser/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ mod test {
let mut attributes = HashMap::new();
attributes.insert("id".to_string(), "test".to_string());
let node = Node::new_element("div", attributes, HTML_NAMESPACE);
assert_eq!(node.is_special(), true);
assert!(node.is_special());
}

#[test]
Expand All @@ -332,7 +332,7 @@ mod test {
let mut attributes = HashMap::new();
attributes.insert("id".to_string(), "test".to_string());
let node = Node::new_element(element, attributes, HTML_NAMESPACE);
assert_eq!(node.is_special(), true);
assert!(node.is_special());
}
}

Expand All @@ -342,7 +342,7 @@ mod test {
let mut attributes = HashMap::new();
attributes.insert("id".to_string(), "test".to_string());
let node = Node::new_element(element, attributes, MATHML_NAMESPACE);
assert_eq!(node.is_special(), true);
assert!(node.is_special());
}
}

Expand All @@ -352,7 +352,7 @@ mod test {
let mut attributes = HashMap::new();
attributes.insert("id".to_string(), "test".to_string());
let node = Node::new_element(element, attributes, SVG_NAMESPACE);
assert_eq!(node.is_special(), true);
assert!(node.is_special());
}
}

Expand Down

0 comments on commit 558e3dc

Please sign in to comment.